aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-29 16:31:26 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-08 15:18:55 +0100
commita4723041857eaa35f189d237da769c4c63235544 (patch)
tree31ba3b59cadb8f3e0488e0dd221edb047099c343 /drivers/base/bus.c
parentdriver core: bus: convert to use BUS_ATTR_WO and RW (diff)
downloadlinux-dev-a4723041857eaa35f189d237da769c4c63235544.tar.xz
linux-dev-a4723041857eaa35f189d237da769c4c63235544.zip
driver core: drop use of BUS_ATTR()
We are trying to get rid of BUS_ATTR() so drop the last user of it from the tree. We had to "open code" it in order to prevent a function name conflict due to the use of DEVICE_ATTR_WO() earlier in the file :( Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r--drivers/base/bus.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index a56e865cdbfa..3ab45843da39 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -837,7 +837,14 @@ static ssize_t bus_uevent_store(struct bus_type *bus,
rc = kobject_synth_uevent(&bus->p->subsys.kobj, buf, count);
return rc ? rc : count;
}
-static BUS_ATTR(uevent, S_IWUSR, NULL, bus_uevent_store);
+/*
+ * "open code" the old BUS_ATTR() macro here. We want to use BUS_ATTR_WO()
+ * here, but can not use it as earlier in the file we have
+ * DEVICE_ATTR_WO(uevent), which would cause a clash with the with the store
+ * function name.
+ */
+static struct bus_attribute bus_attr_uevent = __ATTR(uevent, S_IWUSR, NULL,
+ bus_uevent_store);
/**
* bus_register - register a driver-core subsystem