From cad4cd8fbde6b2f45b51711260343b3195615c79 Mon Sep 17 00:00:00 2001 From: Andrzej Pietrasiewicz Date: Thu, 10 May 2012 10:08:00 +0200 Subject: 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 Signed-off-by: Kyungmin Park Signed-off-by: Greg Kroah-Hartman --- include/linux/usb/composite.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/usb') 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 *, * @iManufacturer: Used as iManufacturer override if @dev->iManufacturer is * not set. If NULL a default " with " value * will be used. + * @iSerialNumber: Used as iSerialNumber override if @dev->iSerialNumber is + * not set. * @dev: Template descriptor for the device, including default device * identifiers. * @strings: tables of strings, keyed by identifiers assigned during bind() @@ -283,6 +285,7 @@ struct usb_composite_driver { const char *name; const char *iProduct; const char *iManufacturer; + const char *iSerialNumber; const struct usb_device_descriptor *dev; struct usb_gadget_strings **strings; enum usb_device_speed max_speed; -- cgit v1.2.3