diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/message.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 5498506e9c5e..d8f7b089a8f0 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -1358,6 +1358,30 @@ static int usb_if_uevent(struct device *dev, char **envp, int num_envp, | |||
1358 | usb_dev = interface_to_usbdev(intf); | 1358 | usb_dev = interface_to_usbdev(intf); |
1359 | alt = intf->cur_altsetting; | 1359 | alt = intf->cur_altsetting; |
1360 | 1360 | ||
1361 | #ifdef CONFIG_USB_DEVICEFS | ||
1362 | if (add_uevent_var(envp, num_envp, &i, | ||
1363 | buffer, buffer_size, &length, | ||
1364 | "DEVICE=/proc/bus/usb/%03d/%03d", | ||
1365 | usb_dev->bus->busnum, usb_dev->devnum)) | ||
1366 | return -ENOMEM; | ||
1367 | #endif | ||
1368 | |||
1369 | if (add_uevent_var(envp, num_envp, &i, | ||
1370 | buffer, buffer_size, &length, | ||
1371 | "PRODUCT=%x/%x/%x", | ||
1372 | le16_to_cpu(usb_dev->descriptor.idVendor), | ||
1373 | le16_to_cpu(usb_dev->descriptor.idProduct), | ||
1374 | le16_to_cpu(usb_dev->descriptor.bcdDevice))) | ||
1375 | return -ENOMEM; | ||
1376 | |||
1377 | if (add_uevent_var(envp, num_envp, &i, | ||
1378 | buffer, buffer_size, &length, | ||
1379 | "TYPE=%d/%d/%d", | ||
1380 | usb_dev->descriptor.bDeviceClass, | ||
1381 | usb_dev->descriptor.bDeviceSubClass, | ||
1382 | usb_dev->descriptor.bDeviceProtocol)) | ||
1383 | return -ENOMEM; | ||
1384 | |||
1361 | if (add_uevent_var(envp, num_envp, &i, | 1385 | if (add_uevent_var(envp, num_envp, &i, |
1362 | buffer, buffer_size, &length, | 1386 | buffer, buffer_size, &length, |
1363 | "INTERFACE=%d/%d/%d", | 1387 | "INTERFACE=%d/%d/%d", |