RE: [PATCH v2 01/37] usb/gadget: use consistent naming scheme for usb function modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, February 26, 2013 6:57 PM Felipe Balbi wrote:

> Hi,
> 
> On Tue, Feb 26, 2013 at 06:52:17PM +0100, Andrzej Pietrasiewicz wrote:
> > In order to convert to configfs the USB functions need to be converted
> > to the new interface from Sebastian, which also requires turning them
> > into separate modules. Some of these modules will consist of just one
> > object file, e.g. f_ncm.o. But some of the modules will eventually
> > consist of more than one object file, e.g. for mass storage there will
> > be f_mass_storage.o and storage_common.o. The resulting module cannot
> > be called f_mass_storage.ko due to cyclic dependency. This patch
> > introduces a naming scheme for the said resulting modules:
> >
> > f_xxxxxx_usb.ko
> >
> > e.g. f_mass_storage_usb.ko, f_ss_lb_usb.ko, f_rndis_usb.ko etc.
> 
> IMHO each function should be a separate module, so this f_ss_lb_usb.ko is
> wrong. We should have f_sourcesink.ko and f_loopback.ko.

Merging sourcesink and loopback into one module was done by Sebastian. I
_think_
he did it in order to be as close as possible to the original gadgets by
David
Brownell.

I only changed the naming scheme by adding the *_usb suffix.
The purpose of this patch is to allow combining several object files into
a single module whose name will not clash with its component object files.

Example:

f_mass_storage.o + storage_common.o = f_mass_storage_usb.ko

or

f_fndis.o + rndis.o = f_rndis_usb.ko

The right hand side of the first "equation" cannot be f_mass_storage.ko,
because a cyclic dependency occurs. Similar with the second.
So I come up with the _usb suffix. Besides, if a user does "lsmod",
then the *_usb suffix will look more explicit, e.g.

$ lsmod

....
f_mass_storage_usb
f_ecm_usb
.....

Perhaps this could be the other way round:

....
usb_f_mass_storage
usb_f_ecm

AP


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux