message.c (a8931ef380c92d121ae74ecfb03b2d63f72eea6f) | message.c (7071a3ce0ca058ad2a9e3e8c33f30fb0bce62005) |
---|---|
1/* 2 * message.c - synchronous message handling 3 */ 4 5#include <linux/pci.h> /* for scatterlist macros */ 6#include <linux/usb.h> 7#include <linux/module.h> 8#include <linux/slab.h> --- 1076 unchanged lines hidden (view full) --- 1085 for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { 1086 struct usb_interface *interface; 1087 1088 /* remove this interface if it has been registered */ 1089 interface = dev->actconfig->interface[i]; 1090 if (!device_is_registered(&interface->dev)) 1091 continue; 1092 dev_dbg(&dev->dev, "unregistering interface %s\n", | 1/* 2 * message.c - synchronous message handling 3 */ 4 5#include <linux/pci.h> /* for scatterlist macros */ 6#include <linux/usb.h> 7#include <linux/module.h> 8#include <linux/slab.h> --- 1076 unchanged lines hidden (view full) --- 1085 for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { 1086 struct usb_interface *interface; 1087 1088 /* remove this interface if it has been registered */ 1089 interface = dev->actconfig->interface[i]; 1090 if (!device_is_registered(&interface->dev)) 1091 continue; 1092 dev_dbg(&dev->dev, "unregistering interface %s\n", |
1093 interface->dev.bus_id); | 1093 dev_name(&interface->dev)); |
1094 device_del(&interface->dev); 1095 usb_remove_sysfs_intf_files(interface); 1096 } 1097 1098 /* Now that the interfaces are unbound, nobody should 1099 * try to access them. 1100 */ 1101 for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { --- 524 unchanged lines hidden (view full) --- 1626 * claim() any interfaces not yet bound. Many class drivers 1627 * need that: CDC, audio, video, etc. 1628 */ 1629 for (i = 0; i < nintf; ++i) { 1630 struct usb_interface *intf = cp->interface[i]; 1631 1632 dev_dbg(&dev->dev, 1633 "adding %s (config #%d, interface %d)\n", | 1094 device_del(&interface->dev); 1095 usb_remove_sysfs_intf_files(interface); 1096 } 1097 1098 /* Now that the interfaces are unbound, nobody should 1099 * try to access them. 1100 */ 1101 for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { --- 524 unchanged lines hidden (view full) --- 1626 * claim() any interfaces not yet bound. Many class drivers 1627 * need that: CDC, audio, video, etc. 1628 */ 1629 for (i = 0; i < nintf; ++i) { 1630 struct usb_interface *intf = cp->interface[i]; 1631 1632 dev_dbg(&dev->dev, 1633 "adding %s (config #%d, interface %d)\n", |
1634 intf->dev.bus_id, configuration, | 1634 dev_name(&intf->dev), configuration, |
1635 intf->cur_altsetting->desc.bInterfaceNumber); 1636 ret = device_add(&intf->dev); 1637 if (ret != 0) { 1638 dev_err(&dev->dev, "device_add(%s) --> %d\n", | 1635 intf->cur_altsetting->desc.bInterfaceNumber); 1636 ret = device_add(&intf->dev); 1637 if (ret != 0) { 1638 dev_err(&dev->dev, "device_add(%s) --> %d\n", |
1639 intf->dev.bus_id, ret); | 1639 dev_name(&intf->dev), ret); |
1640 continue; 1641 } 1642 usb_create_sysfs_intf_files(intf); 1643 } 1644 1645 usb_autosuspend_device(dev); 1646 return 0; 1647} --- 56 unchanged lines hidden --- | 1640 continue; 1641 } 1642 usb_create_sysfs_intf_files(intf); 1643 } 1644 1645 usb_autosuspend_device(dev); 1646 return 0; 1647} --- 56 unchanged lines hidden --- |