Commit 2bd6a021e887c675116ff8cdacc3af49999a2224
Committed by
Greg Kroah-Hartman
1 parent
d3cec81fc9
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
usb-core: remove CONFIG_HOTPLUG ifdefs
Remove conditional code based on CONFIG_HOTPLUG being false. It's always on now in preparation of it going away as an option. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 4 changed files with 0 additions and 53 deletions Side-by-side Diff
drivers/usb/core/driver.c
... | ... | @@ -32,8 +32,6 @@ |
32 | 32 | #include "usb.h" |
33 | 33 | |
34 | 34 | |
35 | -#ifdef CONFIG_HOTPLUG | |
36 | - | |
37 | 35 | /* |
38 | 36 | * Adds a new dynamic USBdevice ID to this driver, |
39 | 37 | * and cause the driver to probe for all devices again. |
40 | 38 | |
... | ... | @@ -194,21 +192,7 @@ |
194 | 192 | } |
195 | 193 | spin_unlock(&usb_drv->dynids.lock); |
196 | 194 | } |
197 | -#else | |
198 | -static inline int usb_create_newid_files(struct usb_driver *usb_drv) | |
199 | -{ | |
200 | - return 0; | |
201 | -} | |
202 | 195 | |
203 | -static void usb_remove_newid_files(struct usb_driver *usb_drv) | |
204 | -{ | |
205 | -} | |
206 | - | |
207 | -static inline void usb_free_dynids(struct usb_driver *usb_drv) | |
208 | -{ | |
209 | -} | |
210 | -#endif | |
211 | - | |
212 | 196 | static const struct usb_device_id *usb_match_dynamic_id(struct usb_interface *intf, |
213 | 197 | struct usb_driver *drv) |
214 | 198 | { |
... | ... | @@ -790,7 +774,6 @@ |
790 | 774 | return 0; |
791 | 775 | } |
792 | 776 | |
793 | -#ifdef CONFIG_HOTPLUG | |
794 | 777 | static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) |
795 | 778 | { |
796 | 779 | struct usb_device *usb_dev; |
... | ... | @@ -831,14 +814,6 @@ |
831 | 814 | |
832 | 815 | return 0; |
833 | 816 | } |
834 | - | |
835 | -#else | |
836 | - | |
837 | -static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) | |
838 | -{ | |
839 | - return -ENODEV; | |
840 | -} | |
841 | -#endif /* CONFIG_HOTPLUG */ | |
842 | 817 | |
843 | 818 | /** |
844 | 819 | * usb_register_device_driver - register a USB device (not interface) driver |
drivers/usb/core/message.c
... | ... | @@ -1540,7 +1540,6 @@ |
1540 | 1540 | kfree(intf); |
1541 | 1541 | } |
1542 | 1542 | |
1543 | -#ifdef CONFIG_HOTPLUG | |
1544 | 1543 | static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) |
1545 | 1544 | { |
1546 | 1545 | struct usb_device *usb_dev; |
... | ... | @@ -1574,14 +1573,6 @@ |
1574 | 1573 | |
1575 | 1574 | return 0; |
1576 | 1575 | } |
1577 | - | |
1578 | -#else | |
1579 | - | |
1580 | -static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) | |
1581 | -{ | |
1582 | - return -ENODEV; | |
1583 | -} | |
1584 | -#endif /* CONFIG_HOTPLUG */ | |
1585 | 1576 | |
1586 | 1577 | struct device_type usb_if_device_type = { |
1587 | 1578 | .name = "usb_interface", |
drivers/usb/core/usb.c
... | ... | @@ -233,7 +233,6 @@ |
233 | 233 | kfree(udev); |
234 | 234 | } |
235 | 235 | |
236 | -#ifdef CONFIG_HOTPLUG | |
237 | 236 | static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) |
238 | 237 | { |
239 | 238 | struct usb_device *usb_dev; |
... | ... | @@ -248,14 +247,6 @@ |
248 | 247 | |
249 | 248 | return 0; |
250 | 249 | } |
251 | - | |
252 | -#else | |
253 | - | |
254 | -static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) | |
255 | -{ | |
256 | - return -ENODEV; | |
257 | -} | |
258 | -#endif /* CONFIG_HOTPLUG */ | |
259 | 250 | |
260 | 251 | #ifdef CONFIG_PM |
261 | 252 |
drivers/usb/serial/bus.c
... | ... | @@ -121,7 +121,6 @@ |
121 | 121 | return retval; |
122 | 122 | } |
123 | 123 | |
124 | -#ifdef CONFIG_HOTPLUG | |
125 | 124 | static ssize_t store_new_id(struct device_driver *driver, |
126 | 125 | const char *buf, size_t count) |
127 | 126 | { |
... | ... | @@ -158,15 +157,6 @@ |
158 | 157 | } |
159 | 158 | spin_unlock(&drv->dynids.lock); |
160 | 159 | } |
161 | - | |
162 | -#else | |
163 | -static struct driver_attribute drv_attrs[] = { | |
164 | - __ATTR_NULL, | |
165 | -}; | |
166 | -static inline void free_dynids(struct usb_serial_driver *drv) | |
167 | -{ | |
168 | -} | |
169 | -#endif | |
170 | 160 | |
171 | 161 | struct bus_type usb_serial_bus_type = { |
172 | 162 | .name = "usb-serial", |