aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2012-05-10 04:08:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-10 15:22:43 -0400
commitcad4cd8fbde6b2f45b51711260343b3195615c79 (patch)
treeabe2c3a65dd1843f2c7c4e7d6ccaf9333c26be4b /include/linux/usb
parent4fffd6e5a24c4df3341d404446e3672bef8cffb7 (diff)
usb: gadget: composite: add iSerialNumber to usb_composite_driver
Add iSerialNumber to usb_composite_driver to allow setting a default value. This is useful when the module is compiled-in. Then the composite_bind is executed at kernel boot and string id for iSerialNumber can be overridden even if there is no iSerialNumber kernel commandline parameter. If the string id is not overridden, then get_string will never attempt to look for the alternative string contents using cdev->serial_override. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/composite.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 5d27a1fe5ce9..9d8c3b634493 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -253,6 +253,8 @@ void usb_remove_config(struct usb_composite_dev *,
253 * @iManufacturer: Used as iManufacturer override if @dev->iManufacturer is 253 * @iManufacturer: Used as iManufacturer override if @dev->iManufacturer is
254 * not set. If NULL a default "<system> <release> with <udc>" value 254 * not set. If NULL a default "<system> <release> with <udc>" value
255 * will be used. 255 * will be used.
256 * @iSerialNumber: Used as iSerialNumber override if @dev->iSerialNumber is
257 * not set.
256 * @dev: Template descriptor for the device, including default device 258 * @dev: Template descriptor for the device, including default device
257 * identifiers. 259 * identifiers.
258 * @strings: tables of strings, keyed by identifiers assigned during bind() 260 * @strings: tables of strings, keyed by identifiers assigned during bind()
@@ -283,6 +285,7 @@ struct usb_composite_driver {
283 const char *name; 285 const char *name;
284 const char *iProduct; 286 const char *iProduct;
285 const char *iManufacturer; 287 const char *iManufacturer;
288 const char *iSerialNumber;
286 const struct usb_device_descriptor *dev; 289 const struct usb_device_descriptor *dev;
287 struct usb_gadget_strings **strings; 290 struct usb_gadget_strings **strings;
288 enum usb_device_speed max_speed; 291 enum usb_device_speed max_speed;