Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jassi Brar and committed by
Greg Kroah-Hartman
05c3eebd ff085de7

+3 -3
+3 -3
drivers/usb/gadget/composite.c
··· 1258 1258 * while it was binding. That would usually be done in order to wait for 1259 1259 * some userspace participation. 1260 1260 */ 1261 - extern int usb_composite_probe(struct usb_composite_driver *driver, 1261 + int usb_composite_probe(struct usb_composite_driver *driver, 1262 1262 int (*bind)(struct usb_composite_dev *cdev)) 1263 1263 { 1264 1264 if (!driver || !driver->dev || !bind || composite) 1265 1265 return -EINVAL; 1266 1266 1267 - if (!driver->iProduct) 1268 - driver->iProduct = driver->name; 1269 1267 if (!driver->name) 1270 1268 driver->name = "composite"; 1269 + if (!driver->iProduct) 1270 + driver->iProduct = driver->name; 1271 1271 composite_driver.function = (char *) driver->name; 1272 1272 composite_driver.driver.name = driver->name; 1273 1273 composite = driver;