On Mon, 8 Aug 2005, James Bottomley wrote: > Yes, I was considering something similar, since all the last put of a > driver does is send the completion that driver_unregister() should be > waiting for That's exactly how I came to think of it. > > > + struct device_driver *parent_driver; > > I don't think we need this. The underlying device has to be the parent > of shost_gendev, so you can get the parent driver as > > shost_gendev.parent->driver The driver may have completely unbound from the parent device by the time shost_gendev is released, so .parent->driver may already be NULL. > > + if (shost->parent_driver) > > + put_driver(shost->parent_driver); > > And just before this would be the place to do the final release of all > the resources the HBA is holding. Right. Alan Stern - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html