diff options
| author | Bill Pemberton <wfp5p@virginia.edu> | 2012-11-19 13:19:16 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-21 16:27:16 -0500 |
| commit | 2bd6a021e887c675116ff8cdacc3af49999a2224 (patch) | |
| tree | 0459f13c700834c12a9d22edbd059d9b3fd4083d | |
| parent | d3cec81fc929b6edc43bd42725929685359adef7 (diff) | |
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>
| -rw-r--r-- | drivers/usb/core/driver.c | 25 | ||||
| -rw-r--r-- | drivers/usb/core/message.c | 9 | ||||
| -rw-r--r-- | drivers/usb/core/usb.c | 9 | ||||
| -rw-r--r-- | drivers/usb/serial/bus.c | 10 |
4 files changed, 0 insertions, 53 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 6056db7af41..88dde95b679 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
| @@ -32,8 +32,6 @@ | |||
| 32 | #include "usb.h" | 32 | #include "usb.h" |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | #ifdef CONFIG_HOTPLUG | ||
| 36 | |||
| 37 | /* | 35 | /* |
| 38 | * Adds a new dynamic USBdevice ID to this driver, | 36 | * Adds a new dynamic USBdevice ID to this driver, |
| 39 | * and cause the driver to probe for all devices again. | 37 | * and cause the driver to probe for all devices again. |
| @@ -194,20 +192,6 @@ static void usb_free_dynids(struct usb_driver *usb_drv) | |||
| 194 | } | 192 | } |
| 195 | spin_unlock(&usb_drv->dynids.lock); | 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 | |||
| 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 | 195 | ||
| 212 | static const struct usb_device_id *usb_match_dynamic_id(struct usb_interface *intf, | 196 | static const struct usb_device_id *usb_match_dynamic_id(struct usb_interface *intf, |
| 213 | struct usb_driver *drv) | 197 | struct usb_driver *drv) |
| @@ -790,7 +774,6 @@ static int usb_device_match(struct device *dev, struct device_driver *drv) | |||
| 790 | return 0; | 774 | return 0; |
| 791 | } | 775 | } |
| 792 | 776 | ||
| 793 | #ifdef CONFIG_HOTPLUG | ||
| 794 | static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) | 777 | static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 795 | { | 778 | { |
| 796 | struct usb_device *usb_dev; | 779 | struct usb_device *usb_dev; |
| @@ -832,14 +815,6 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 832 | return 0; | 815 | return 0; |
| 833 | } | 816 | } |
| 834 | 817 | ||
| 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 | |||
| 843 | /** | 818 | /** |
| 844 | * usb_register_device_driver - register a USB device (not interface) driver | 819 | * usb_register_device_driver - register a USB device (not interface) driver |
| 845 | * @new_udriver: USB operations for the device driver | 820 | * @new_udriver: USB operations for the device driver |
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index a557658f322..73c5d1a0413 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
| @@ -1540,7 +1540,6 @@ static void usb_release_interface(struct device *dev) | |||
| 1540 | kfree(intf); | 1540 | kfree(intf); |
| 1541 | } | 1541 | } |
| 1542 | 1542 | ||
| 1543 | #ifdef CONFIG_HOTPLUG | ||
| 1544 | static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) | 1543 | static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 1545 | { | 1544 | { |
| 1546 | struct usb_device *usb_dev; | 1545 | struct usb_device *usb_dev; |
| @@ -1575,14 +1574,6 @@ static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 1575 | return 0; | 1574 | return 0; |
| 1576 | } | 1575 | } |
| 1577 | 1576 | ||
| 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 | |||
| 1586 | struct device_type usb_if_device_type = { | 1577 | struct device_type usb_if_device_type = { |
| 1587 | .name = "usb_interface", | 1578 | .name = "usb_interface", |
| 1588 | .release = usb_release_interface, | 1579 | .release = usb_release_interface, |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 7d3de09a82e..f81b9257273 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
| @@ -233,7 +233,6 @@ static void usb_release_dev(struct device *dev) | |||
| 233 | kfree(udev); | 233 | kfree(udev); |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | #ifdef CONFIG_HOTPLUG | ||
| 237 | static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) | 236 | static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 238 | { | 237 | { |
| 239 | struct usb_device *usb_dev; | 238 | struct usb_device *usb_dev; |
| @@ -249,14 +248,6 @@ static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 249 | return 0; | 248 | return 0; |
| 250 | } | 249 | } |
| 251 | 250 | ||
| 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 | |||
| 260 | #ifdef CONFIG_PM | 251 | #ifdef CONFIG_PM |
| 261 | 252 | ||
| 262 | /* USB device Power-Management thunks. | 253 | /* USB device Power-Management thunks. |
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index c15f2e7cefc..37decb13d7e 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c | |||
| @@ -121,7 +121,6 @@ static int usb_serial_device_remove(struct device *dev) | |||
| 121 | return retval; | 121 | return retval; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | #ifdef CONFIG_HOTPLUG | ||
| 125 | static ssize_t store_new_id(struct device_driver *driver, | 124 | static ssize_t store_new_id(struct device_driver *driver, |
| 126 | const char *buf, size_t count) | 125 | const char *buf, size_t count) |
| 127 | { | 126 | { |
| @@ -159,15 +158,6 @@ static void free_dynids(struct usb_serial_driver *drv) | |||
| 159 | spin_unlock(&drv->dynids.lock); | 158 | spin_unlock(&drv->dynids.lock); |
| 160 | } | 159 | } |
| 161 | 160 | ||
| 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 | |||
| 171 | struct bus_type usb_serial_bus_type = { | 161 | struct bus_type usb_serial_bus_type = { |
| 172 | .name = "usb-serial", | 162 | .name = "usb-serial", |
| 173 | .match = usb_serial_device_match, | 163 | .match = usb_serial_device_match, |
