summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/bus.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index b886b15cb53b..e06a57936cc9 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -31,6 +31,9 @@ static struct kset *system_kset;
31 31
32#define to_drv_attr(_attr) container_of(_attr, struct driver_attribute, attr) 32#define to_drv_attr(_attr) container_of(_attr, struct driver_attribute, attr)
33 33
34#define DRIVER_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \
35 struct driver_attribute driver_attr_##_name = \
36 __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)
34 37
35static int __must_check bus_rescan_devices_helper(struct device *dev, 38static int __must_check bus_rescan_devices_helper(struct device *dev,
36 void *data); 39 void *data);
@@ -195,7 +198,7 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf,
195 bus_put(bus); 198 bus_put(bus);
196 return err; 199 return err;
197} 200}
198static DRIVER_ATTR_WO(unbind); 201static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, S_IWUSR, NULL, unbind_store);
199 202
200/* 203/*
201 * Manually attach a device to a driver. 204 * Manually attach a device to a driver.
@@ -231,7 +234,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,
231 bus_put(bus); 234 bus_put(bus);
232 return err; 235 return err;
233} 236}
234static DRIVER_ATTR_WO(bind); 237static DRIVER_ATTR_IGNORE_LOCKDEP(bind, S_IWUSR, NULL, bind_store);
235 238
236static ssize_t show_drivers_autoprobe(struct bus_type *bus, char *buf) 239static ssize_t show_drivers_autoprobe(struct bus_type *bus, char *buf)
237{ 240{