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>
This commit is contained in:
parent
38de2790c7
commit
a42d1e31d4
@ -164,8 +164,6 @@ static const struct kset_uevent_ops bus_uevent_ops = {
|
|||||||
|
|
||||||
static struct kset *bus_kset;
|
static struct kset *bus_kset;
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG
|
|
||||||
/* Manually detach a device from its associated driver. */
|
/* Manually detach a device from its associated driver. */
|
||||||
static ssize_t driver_unbind(struct device_driver *drv,
|
static ssize_t driver_unbind(struct device_driver *drv,
|
||||||
const char *buf, size_t count)
|
const char *buf, size_t count)
|
||||||
@ -252,7 +250,6 @@ static ssize_t store_drivers_probe(struct bus_type *bus,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct device *next_device(struct klist_iter *i)
|
static struct device *next_device(struct klist_iter *i)
|
||||||
{
|
{
|
||||||
@ -618,11 +615,6 @@ static void driver_remove_attrs(struct bus_type *bus,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG
|
|
||||||
/*
|
|
||||||
* Thanks to drivers making their tables __devinit, we can't allow manual
|
|
||||||
* bind and unbind from userspace unless CONFIG_HOTPLUG is enabled.
|
|
||||||
*/
|
|
||||||
static int __must_check add_bind_files(struct device_driver *drv)
|
static int __must_check add_bind_files(struct device_driver *drv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -666,12 +658,6 @@ static void remove_probe_files(struct bus_type *bus)
|
|||||||
bus_remove_file(bus, &bus_attr_drivers_autoprobe);
|
bus_remove_file(bus, &bus_attr_drivers_autoprobe);
|
||||||
bus_remove_file(bus, &bus_attr_drivers_probe);
|
bus_remove_file(bus, &bus_attr_drivers_probe);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static inline int add_bind_files(struct device_driver *drv) { return 0; }
|
|
||||||
static inline void remove_bind_files(struct device_driver *drv) {}
|
|
||||||
static inline int add_probe_files(struct bus_type *bus) { return 0; }
|
|
||||||
static inline void remove_probe_files(struct bus_type *bus) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static ssize_t driver_uevent_store(struct device_driver *drv,
|
static ssize_t driver_uevent_store(struct device_driver *drv,
|
||||||
const char *buf, size_t count)
|
const char *buf, size_t count)
|
||||||
|
Loading…
Reference in New Issue
Block a user