diff options
-rw-r--r-- | drivers/base/bus.c | 7 |
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 | ||
35 | static int __must_check bus_rescan_devices_helper(struct device *dev, | 38 | static 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 | } |
198 | static DRIVER_ATTR_WO(unbind); | 201 | static 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 | } |
234 | static DRIVER_ATTR_WO(bind); | 237 | static DRIVER_ATTR_IGNORE_LOCKDEP(bind, S_IWUSR, NULL, bind_store); |
235 | 238 | ||
236 | static ssize_t show_drivers_autoprobe(struct bus_type *bus, char *buf) | 239 | static ssize_t show_drivers_autoprobe(struct bus_type *bus, char *buf) |
237 | { | 240 | { |