Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bill Pemberton and committed by
Greg Kroah-Hartman
2bd6a021 d3cec81f

-53
-25
drivers/usb/core/driver.c
··· 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. ··· 192 194 } 193 195 spin_unlock(&usb_drv->dynids.lock); 194 196 } 195 - #else 196 - static inline int usb_create_newid_files(struct usb_driver *usb_drv) 197 - { 198 - return 0; 199 - } 200 - 201 - static void usb_remove_newid_files(struct usb_driver *usb_drv) 202 - { 203 - } 204 - 205 - static inline void usb_free_dynids(struct usb_driver *usb_drv) 206 - { 207 - } 208 - #endif 209 197 210 198 static const struct usb_device_id *usb_match_dynamic_id(struct usb_interface *intf, 211 199 struct usb_driver *drv) ··· 774 790 return 0; 775 791 } 776 792 777 - #ifdef CONFIG_HOTPLUG 778 793 static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) 779 794 { 780 795 struct usb_device *usb_dev; ··· 814 831 815 832 return 0; 816 833 } 817 - 818 - #else 819 - 820 - static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) 821 - { 822 - return -ENODEV; 823 - } 824 - #endif /* CONFIG_HOTPLUG */ 825 834 826 835 /** 827 836 * usb_register_device_driver - register a USB device (not interface) driver
-9
drivers/usb/core/message.c
··· 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; ··· 1573 1574 1574 1575 return 0; 1575 1576 } 1576 - 1577 - #else 1578 - 1579 - static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) 1580 - { 1581 - return -ENODEV; 1582 - } 1583 - #endif /* CONFIG_HOTPLUG */ 1584 1577 1585 1578 struct device_type usb_if_device_type = { 1586 1579 .name = "usb_interface",
-9
drivers/usb/core/usb.c
··· 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; ··· 247 248 248 249 return 0; 249 250 } 250 - 251 - #else 252 - 253 - static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) 254 - { 255 - return -ENODEV; 256 - } 257 - #endif /* CONFIG_HOTPLUG */ 258 251 259 252 #ifdef CONFIG_PM 260 253
-10
drivers/usb/serial/bus.c
··· 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 { ··· 157 158 } 158 159 spin_unlock(&drv->dynids.lock); 159 160 } 160 - 161 - #else 162 - static struct driver_attribute drv_attrs[] = { 163 - __ATTR_NULL, 164 - }; 165 - static inline void free_dynids(struct usb_serial_driver *drv) 166 - { 167 - } 168 - #endif 169 161 170 162 struct bus_type usb_serial_bus_type = { 171 163 .name = "usb-serial",