Re: [PATCH v6 0/4] scsi: ufs & ums-* & esp_scsi: fix module reference counting

James Bottomley
2015-05-04T21:41:07Z

On Mon, 2015-05-04 at 16:09 -0400, Alan Stern wrote:
> On Mon, 4 May 2015, James Bottomley wrote:
>
> > However, it does also strike me that these three drivers have problems
> > because they're using the wrong initialisation pattern: the template is
> > supposed to be in the bus connector for compound drivers not in the
> > core.
>
> Why is it supposed to be done that way? Isn't that less efficient? It
> means you have to have a separate copy of the template for each bus
> connector driver, instead of letting them all share a common template
> in the core.

Well, no it doesn't. The way 53c700 implements it is that there is a
common template in the core. The drivers just initialise their variant
fields (for 53c700 it's name, proc_name and this_id) and the core fills
in the rest. Admittedly wd33c93 doesn't quite get this right, that's
why I cited 53c700.

James