diff options
author | Jassi Brar <jassi.brar@samsung.com> | 2011-02-06 18:47:18 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 10:41:46 -0800 |
commit | 05c3eebd50ad831c462ec264f82a87654d0ee974 (patch) | |
tree | 22cde597c2832193970062ab27eb791604e7f989 /drivers/usb/gadget/composite.c | |
parent | ff085de758ebcb2309dd013fecb7cbb3cb6c7a43 (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/composite.c')
-rw-r--r-- | drivers/usb/gadget/composite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index bbbbfb70750..53e0496c71b 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1258,16 +1258,16 @@ static struct usb_gadget_driver composite_driver = { * while it was binding. That would usually be done in order to wait for * some userspace participation. */ -extern int usb_composite_probe(struct usb_composite_driver *driver, +int usb_composite_probe(struct usb_composite_driver *driver, int (*bind)(struct usb_composite_dev *cdev)) { if (!driver || !driver->dev || !bind || composite) return -EINVAL; - if (!driver->iProduct) - driver->iProduct = driver->name; if (!driver->name) driver->name = "composite"; + if (!driver->iProduct) + driver->iProduct = driver->name; composite_driver.function = (char *) driver->name; composite_driver.driver.name = driver->name; composite = driver; |