diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-23 16:35:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-23 16:35:19 -0500 |
commit | 17a3be341e55b49e4579634281b86f1eb0bad8e8 (patch) | |
tree | 7c2857db7afb9b0fca2a15b1602333b2c5125780 /drivers/usb/core/sysfs.c | |
parent | f793067eb91afa37904d33075bd44fd8b2774b8a (diff) | |
parent | 37e9066b2f85480d99d3795373f5ef0b00ac1189 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits)
USB: Fix a bug on appledisplay.c regarding signedness
USB: option: support hi speed for modem Haier CE100
USB: audio gadget: free alsa devices when unloading
USB: audio gadget: fix wTotalLength calculation
usb: otg: isp1301_omap: fix compile error
USB: musb: workaround Blackfin FIFO anomalies
USB: musb: Fix array index out of bounds issue
USB: musb: Fix null pointer dereference issue
USB: musb: correct DMA address for tx
USB: musb: gadget_ep0: avoid SetupEnd interrupt
USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled
USB: musb: do not work if no gadget driver is loaded
USB: musb: gadget: set otg tranceiver to idle when registering gadget
USB: musb: Populate the VBUS GPIO with the correct GPIO number
USB: musb: MAINTAINERS: Fix my tree's address
USB: musb: fix compiling warning with min() macro
USB: musb: move musb_remove to __exit
USB: musb_gadget: fix kernel oops in txstate()
USB: ftdi_sio: sort PID/VID entries in new ftdi_sio_ids.h header
USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header
...
Diffstat (limited to 'drivers/usb/core/sysfs.c')
-rw-r--r-- | drivers/usb/core/sysfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index 15477008b631..485edf937f25 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -82,9 +82,13 @@ static ssize_t show_##name(struct device *dev, \ | |||
82 | struct device_attribute *attr, char *buf) \ | 82 | struct device_attribute *attr, char *buf) \ |
83 | { \ | 83 | { \ |
84 | struct usb_device *udev; \ | 84 | struct usb_device *udev; \ |
85 | int retval; \ | ||
85 | \ | 86 | \ |
86 | udev = to_usb_device(dev); \ | 87 | udev = to_usb_device(dev); \ |
87 | return sprintf(buf, "%s\n", udev->name); \ | 88 | usb_lock_device(udev); \ |
89 | retval = sprintf(buf, "%s\n", udev->name); \ | ||
90 | usb_unlock_device(udev); \ | ||
91 | return retval; \ | ||
88 | } \ | 92 | } \ |
89 | static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL); | 93 | static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL); |
90 | 94 | ||