aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Pemberton <wfp5p@virginia.edu>2012-11-19 13:19:18 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-28 13:33:03 -0500
commita42d1e31d4a2380cf1bda8e3510ff1859ddf55a5 (patch)
tree627e580f06d62ff8ae999dd54bc052599f2c9e52
parent38de2790c7bd212fa96f50c896fdc2f4def76087 (diff)
driver 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/base/bus.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 181ed2660b33..24eb07868344 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -164,8 +164,6 @@ static const struct kset_uevent_ops bus_uevent_ops = {
164 164
165static struct kset *bus_kset; 165static struct kset *bus_kset;
166 166
167
168#ifdef CONFIG_HOTPLUG
169/* Manually detach a device from its associated driver. */ 167/* Manually detach a device from its associated driver. */
170static ssize_t driver_unbind(struct device_driver *drv, 168static ssize_t driver_unbind(struct device_driver *drv,
171 const char *buf, size_t count) 169 const char *buf, size_t count)
@@ -252,7 +250,6 @@ static ssize_t store_drivers_probe(struct bus_type *bus,
252 return -EINVAL; 250 return -EINVAL;
253 return count; 251 return count;
254} 252}
255#endif
256 253
257static struct device *next_device(struct klist_iter *i) 254static struct device *next_device(struct klist_iter *i)
258{ 255{
@@ -618,11 +615,6 @@ static void driver_remove_attrs(struct bus_type *bus,
618 } 615 }
619} 616}
620 617
621#ifdef CONFIG_HOTPLUG
622/*
623 * Thanks to drivers making their tables __devinit, we can't allow manual
624 * bind and unbind from userspace unless CONFIG_HOTPLUG is enabled.
625 */
626static int __must_check add_bind_files(struct device_driver *drv) 618static int __must_check add_bind_files(struct device_driver *drv)
627{ 619{
628 int ret; 620 int ret;
@@ -666,12 +658,6 @@ static void remove_probe_files(struct bus_type *bus)
666 bus_remove_file(bus, &bus_attr_drivers_autoprobe); 658 bus_remove_file(bus, &bus_attr_drivers_autoprobe);
667 bus_remove_file(bus, &bus_attr_drivers_probe); 659 bus_remove_file(bus, &bus_attr_drivers_probe);
668} 660}
669#else
670static inline int add_bind_files(struct device_driver *drv) { return 0; }
671static inline void remove_bind_files(struct device_driver *drv) {}
672static inline int add_probe_files(struct bus_type *bus) { return 0; }
673static inline void remove_probe_files(struct bus_type *bus) {}
674#endif
675 661
676static ssize_t driver_uevent_store(struct device_driver *drv, 662static ssize_t driver_uevent_store(struct device_driver *drv,
677 const char *buf, size_t count) 663 const char *buf, size_t count)