diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/composite.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 16b353fa160a..8d81a5ccfa03 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -34,27 +34,27 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | static ushort idVendor; | 36 | static ushort idVendor; |
37 | module_param(idVendor, ushort, 0644); | 37 | module_param(idVendor, ushort, S_IRUGO); |
38 | MODULE_PARM_DESC(idVendor, "USB Vendor ID"); | 38 | MODULE_PARM_DESC(idVendor, "USB Vendor ID"); |
39 | 39 | ||
40 | static ushort idProduct; | 40 | static ushort idProduct; |
41 | module_param(idProduct, ushort, 0644); | 41 | module_param(idProduct, ushort, S_IRUGO); |
42 | MODULE_PARM_DESC(idProduct, "USB Product ID"); | 42 | MODULE_PARM_DESC(idProduct, "USB Product ID"); |
43 | 43 | ||
44 | static ushort bcdDevice; | 44 | static ushort bcdDevice; |
45 | module_param(bcdDevice, ushort, 0644); | 45 | module_param(bcdDevice, ushort, S_IRUGO); |
46 | MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)"); | 46 | MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)"); |
47 | 47 | ||
48 | static char *iManufacturer; | 48 | static char *iManufacturer; |
49 | module_param(iManufacturer, charp, 0644); | 49 | module_param(iManufacturer, charp, S_IRUGO); |
50 | MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string"); | 50 | MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string"); |
51 | 51 | ||
52 | static char *iProduct; | 52 | static char *iProduct; |
53 | module_param(iProduct, charp, 0644); | 53 | module_param(iProduct, charp, S_IRUGO); |
54 | MODULE_PARM_DESC(iProduct, "USB Product string"); | 54 | MODULE_PARM_DESC(iProduct, "USB Product string"); |
55 | 55 | ||
56 | static char *iSerialNumber; | 56 | static char *iSerialNumber; |
57 | module_param(iSerialNumber, charp, 0644); | 57 | module_param(iSerialNumber, charp, S_IRUGO); |
58 | MODULE_PARM_DESC(iSerialNumber, "SerialNumber string"); | 58 | MODULE_PARM_DESC(iSerialNumber, "SerialNumber string"); |
59 | 59 | ||
60 | static char composite_manufacturer[50]; | 60 | static char composite_manufacturer[50]; |
@@ -1478,16 +1478,12 @@ static int composite_bind(struct usb_gadget *gadget, | |||
1478 | /* standardized runtime overrides for device ID data */ | 1478 | /* standardized runtime overrides for device ID data */ |
1479 | if (idVendor) | 1479 | if (idVendor) |
1480 | cdev->desc.idVendor = cpu_to_le16(idVendor); | 1480 | cdev->desc.idVendor = cpu_to_le16(idVendor); |
1481 | else | 1481 | |
1482 | idVendor = le16_to_cpu(cdev->desc.idVendor); | ||
1483 | if (idProduct) | 1482 | if (idProduct) |
1484 | cdev->desc.idProduct = cpu_to_le16(idProduct); | 1483 | cdev->desc.idProduct = cpu_to_le16(idProduct); |
1485 | else | 1484 | |
1486 | idProduct = le16_to_cpu(cdev->desc.idProduct); | ||
1487 | if (bcdDevice) | 1485 | if (bcdDevice) |
1488 | cdev->desc.bcdDevice = cpu_to_le16(bcdDevice); | 1486 | cdev->desc.bcdDevice = cpu_to_le16(bcdDevice); |
1489 | else | ||
1490 | bcdDevice = le16_to_cpu(cdev->desc.bcdDevice); | ||
1491 | 1487 | ||
1492 | /* string overrides */ | 1488 | /* string overrides */ |
1493 | if (iManufacturer || !cdev->desc.iManufacturer) { | 1489 | if (iManufacturer || !cdev->desc.iManufacturer) { |