diff options
author | Michal Nazarewicz <m.nazarewicz@samsung.com> | 2010-08-12 17:43:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 19:21:23 +0200 |
commit | ad1a8102f957f4d25fc58cdc10736c5ade7557e1 (patch) | |
tree | a9bb1ee6b26a2171e43edc77dc51fdb839135d90 /drivers/uwb | |
parent | USB: gadget: functionfs: code cleanup (diff) | |
download | linux-ad1a8102f957f4d25fc58cdc10736c5ade7557e1.tar.xz linux-ad1a8102f957f4d25fc58cdc10736c5ade7557e1.zip |
USB: gadget: composite: Better string override handling
The iManufatcurer, iProduct and iSerialNumber composite module
parameters were only used when the gadget driver registers
strings for manufacturer, product and serial number. If the
gadget never bothered to set corresponding fields in USB device
descriptors those module parameters are ignored.
This commit makes the parameters work even if the strings ID
have not been assigned. It also changes the way IDs are
overridden -- what IDs are overridden is now saved in
usb_composite_dev structure -- which makes it unnecessary to
modify the string tables the way previous code did.
The commit also adds a iProduct and iManufatcurer fields to the
usb_composite_device structure. If they are set, appropriate
strings are reserved and added to device descriptor. This makes
it unnecessary for gadget drivers to maintain code for setting
those. If iProduct is not set it defaults to
usb_composite_device::name; if iManufatcurer is not set
a default "<system> <release> with <gadget-name>" is used.
The last thing is that if needs_serial field of
usb_composite_device is set and user failed to provided
iSerialNumber parameter a warning is issued.
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/uwb')
0 files changed, 0 insertions, 0 deletions