aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2011-02-06 04:47:18 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 13:41:46 -0500
commit05c3eebd50ad831c462ec264f82a87654d0ee974 (patch)
tree22cde597c2832193970062ab27eb791604e7f989 /drivers/usb/gadget
parentff085de758ebcb2309dd013fecb7cbb3cb6c7a43 (diff)
USB: Gadget: Reorder driver name assignment
Reorder the driver->name assignment so the 'iProduct' could be initialized as well if both 'name' and 'iProduct' come as NULL by default. Also, remove the misplaced 'extern' keyword. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/composite.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index bbbbfb707504..53e0496c71b5 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1258,16 +1258,16 @@ static struct usb_gadget_driver composite_driver = {
1258 * while it was binding. That would usually be done in order to wait for 1258 * while it was binding. That would usually be done in order to wait for
1259 * some userspace participation. 1259 * some userspace participation.
1260 */ 1260 */
1261extern int usb_composite_probe(struct usb_composite_driver *driver, 1261int usb_composite_probe(struct usb_composite_driver *driver,
1262 int (*bind)(struct usb_composite_dev *cdev)) 1262 int (*bind)(struct usb_composite_dev *cdev))
1263{ 1263{
1264 if (!driver || !driver->dev || !bind || composite) 1264 if (!driver || !driver->dev || !bind || composite)
1265 return -EINVAL; 1265 return -EINVAL;
1266 1266
1267 if (!driver->iProduct)
1268 driver->iProduct = driver->name;
1269 if (!driver->name) 1267 if (!driver->name)
1270 driver->name = "composite"; 1268 driver->name = "composite";
1269 if (!driver->iProduct)
1270 driver->iProduct = driver->name;
1271 composite_driver.function = (char *) driver->name; 1271 composite_driver.function = (char *) driver->name;
1272 composite_driver.driver.name = driver->name; 1272 composite_driver.driver.name = driver->name;
1273 composite = driver; 1273 composite = driver;