summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-23 14:24:40 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 15:49:43 -0700
commit90826ca74017db8d1e1654fee99309cd01364ef9 (patch)
treebf12f54ae082d077db199283d27436a999eee200 /kernel
parentc88dc5554a3a59553e98e89d6d10be7c976179cb (diff)
downloadlinux-90826ca74017db8d1e1654fee99309cd01364ef9.tar.bz2
pmu_bus: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the pmu bus code to use the correct field. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/core.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index dd236b66ca3a..1a825a486a25 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6271,6 +6271,7 @@ type_show(struct device *dev, struct device_attribute *attr, char *page)
return snprintf(page, PAGE_SIZE-1, "%d\n", pmu->type);
}
+static DEVICE_ATTR_RO(type);
static ssize_t
perf_event_mux_interval_ms_show(struct device *dev,
@@ -6315,17 +6316,19 @@ perf_event_mux_interval_ms_store(struct device *dev,
return count;
}
+static DEVICE_ATTR_RW(perf_event_mux_interval_ms);
-static struct device_attribute pmu_dev_attrs[] = {
- __ATTR_RO(type),
- __ATTR_RW(perf_event_mux_interval_ms),
- __ATTR_NULL,
+static struct attribute *pmu_dev_attrs[] = {
+ &dev_attr_type.attr,
+ &dev_attr_perf_event_mux_interval_ms.attr,
+ NULL,
};
+ATTRIBUTE_GROUPS(pmu_dev);
static int pmu_bus_running;
static struct bus_type pmu_bus = {
.name = "event_source",
- .dev_attrs = pmu_dev_attrs,
+ .dev_groups = pmu_dev_groups,
};
static void pmu_dev_release(struct device *dev)