All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: [PATCH 14/15] pmu_bus: convert bus code to use dev_groups
Date: Fri, 23 Aug 2013 14:24:40 -0700	[thread overview]
Message-ID: <1377293081-10957-14-git-send-email-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <1377293081-10957-1-git-send-email-gregkh@linuxfoundation.org>

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>
---
 kernel/events/core.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index f86599e8..0417ccae 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6189,6 +6189,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,
@@ -6233,17 +6234,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)
-- 
1.8.3.rc0.20.gb99dd2e


  parent reply	other threads:[~2013-08-23 21:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23 21:24 [PATCH 01/15] PCI: convert bus code to use bus_groups Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 02/15] rbd: " Greg Kroah-Hartman
2013-08-23 21:24   ` Greg Kroah-Hartman
2013-08-27 12:35   ` Alex Elder
2013-08-28  5:07     ` Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 03/15] rapidio: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 04/15] PPC: ibmebus: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 05/15] PPC: VIO: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 06/15] SCSI: fcoe: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 07/15] Input: gameport: convert bus code to use drv_groups Greg Kroah-Hartman
2013-08-24 23:33   ` Dmitry Torokhov
2013-08-25 21:56     ` Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 08/15] Input: serio: " Greg Kroah-Hartman
2013-08-24 23:33   ` Dmitry Torokhov
2013-08-23 21:24 ` [PATCH 09/15] PCI: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 10/15] USB: serial: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 11/15] driver-core: platform: convert bus code to use dev_groups Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 12/15] HID: " Greg Kroah-Hartman
2013-08-26 11:42   ` Jiri Kosina
2013-08-26 12:05     ` Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 13/15] MEI: " Greg Kroah-Hartman
2013-08-23 21:27   ` Winkler, Tomas
2013-08-23 21:24 ` Greg Kroah-Hartman [this message]
2013-08-23 21:24 ` [PATCH 15/15] workqueue: " Greg Kroah-Hartman
2013-08-23 21:28   ` Tejun Heo
2013-08-23 21:34     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377293081-10957-14-git-send-email-gregkh@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.