diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 19:45:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 19:45:00 -0400 |
commit | c12e69c6aaf785fd307d05cb6f36ca0e7577ead7 (patch) | |
tree | d12feba57d1f42f8a2a1a382d3bea29603312d14 /drivers/usb/core/hub.c | |
parent | 158e0d3621683ee0cdfeeba56f0e5ddd97ae984f (diff) | |
parent | 94debda32429e1a348fec8543245f1190a92d68c (diff) |
Merge tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH:
"Here's the huge drivers/staging/ update for 3.15-rc1.
Loads of cleanup fixes, a few drivers removed, and some new ones
added.
All have been in linux-next for a while"
* tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1375 commits)
staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI
staging: xillybus: Added "select CRC32" for XILLYBUS in Kconfig
staging: comedi: poc: remove obsolete driver
staging: unisys: replace kzalloc/kfree with UISMALLOC/UISFREE
staging: octeon-usb: prevent memory corruption
staging: usbip: fix line over 80 characters
staging: usbip: fix quoted string split across lines
Staging: unisys: Remove RETINT macro
Staging: unisys: Remove FAIL macro
Staging: unisys: Remove RETVOID macro
Staging: unisys: Remove RETPTR macro
Staging: unisys: Remove RETBOOL macro
Staging: unisys: Remove FAIL_WPOSTCODE_1 macro
Staging: unisys: Cleanup macros to get rid of goto statements
Staging: unisys: include: Remove unused macros from timskmod.h
staging: dgap: fix the rest of the checkpatch warnings in dgap.c
Staging: bcm: Remove unnecessary parentheses
staging: wlags49_h2: Delete unnecessary braces
staging: wlags49_h2: Do not use assignment in if condition
staging: wlags49_h2: Enclose macro in a do-while loop
...
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 5cbf78d0be25..610735823d93 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1788,7 +1788,7 @@ hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data) | |||
1788 | * to one of these "claimed" ports, the program will "own" the device. | 1788 | * to one of these "claimed" ports, the program will "own" the device. |
1789 | */ | 1789 | */ |
1790 | static int find_port_owner(struct usb_device *hdev, unsigned port1, | 1790 | static int find_port_owner(struct usb_device *hdev, unsigned port1, |
1791 | struct dev_state ***ppowner) | 1791 | struct usb_dev_state ***ppowner) |
1792 | { | 1792 | { |
1793 | struct usb_hub *hub = usb_hub_to_struct_hub(hdev); | 1793 | struct usb_hub *hub = usb_hub_to_struct_hub(hdev); |
1794 | 1794 | ||
@@ -1806,10 +1806,10 @@ static int find_port_owner(struct usb_device *hdev, unsigned port1, | |||
1806 | 1806 | ||
1807 | /* In the following three functions, the caller must hold hdev's lock */ | 1807 | /* In the following three functions, the caller must hold hdev's lock */ |
1808 | int usb_hub_claim_port(struct usb_device *hdev, unsigned port1, | 1808 | int usb_hub_claim_port(struct usb_device *hdev, unsigned port1, |
1809 | struct dev_state *owner) | 1809 | struct usb_dev_state *owner) |
1810 | { | 1810 | { |
1811 | int rc; | 1811 | int rc; |
1812 | struct dev_state **powner; | 1812 | struct usb_dev_state **powner; |
1813 | 1813 | ||
1814 | rc = find_port_owner(hdev, port1, &powner); | 1814 | rc = find_port_owner(hdev, port1, &powner); |
1815 | if (rc) | 1815 | if (rc) |
@@ -1819,12 +1819,13 @@ int usb_hub_claim_port(struct usb_device *hdev, unsigned port1, | |||
1819 | *powner = owner; | 1819 | *powner = owner; |
1820 | return rc; | 1820 | return rc; |
1821 | } | 1821 | } |
1822 | EXPORT_SYMBOL_GPL(usb_hub_claim_port); | ||
1822 | 1823 | ||
1823 | int usb_hub_release_port(struct usb_device *hdev, unsigned port1, | 1824 | int usb_hub_release_port(struct usb_device *hdev, unsigned port1, |
1824 | struct dev_state *owner) | 1825 | struct usb_dev_state *owner) |
1825 | { | 1826 | { |
1826 | int rc; | 1827 | int rc; |
1827 | struct dev_state **powner; | 1828 | struct usb_dev_state **powner; |
1828 | 1829 | ||
1829 | rc = find_port_owner(hdev, port1, &powner); | 1830 | rc = find_port_owner(hdev, port1, &powner); |
1830 | if (rc) | 1831 | if (rc) |
@@ -1834,8 +1835,9 @@ int usb_hub_release_port(struct usb_device *hdev, unsigned port1, | |||
1834 | *powner = NULL; | 1835 | *powner = NULL; |
1835 | return rc; | 1836 | return rc; |
1836 | } | 1837 | } |
1838 | EXPORT_SYMBOL_GPL(usb_hub_release_port); | ||
1837 | 1839 | ||
1838 | void usb_hub_release_all_ports(struct usb_device *hdev, struct dev_state *owner) | 1840 | void usb_hub_release_all_ports(struct usb_device *hdev, struct usb_dev_state *owner) |
1839 | { | 1841 | { |
1840 | struct usb_hub *hub = usb_hub_to_struct_hub(hdev); | 1842 | struct usb_hub *hub = usb_hub_to_struct_hub(hdev); |
1841 | int n; | 1843 | int n; |