Re: [RFC] 2.6.0 EDD enhancements

James Bottomley
2003-12-19T21:04:01Z

On Fri, 2003-12-19 at 15:37, Matt Domsch wrote:
> Ok, I'll gladly make that change, but I still need a handle on the
> sdev_gendev.kobj in order to make the symlink:

the scsi device does its refcounting through the generic device (and
hence the kobject), so scsi_device_get() does get a handle on the
kobject for you (as well as doing some checks with the SCSI state model
and getting a handle on the underlying module).

> static inline struct device *
> sdev_to_gendev(struct scsi_device *sdev)
> {
> return &sdev->sdev_gendev;
> }

I'm not too sure about this...exporting such a function might be seen as
encouraging further abuse...

James