linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: linux-next@vger.kernel.org
Cc: broonie@kernel.org, rdunlap@infradead.org,
	rafael.j.wysocki@intel.com, jacob.jun.pan@linux.intel.com,
	thierry.reding@gmail.com,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH] PowerCap: Replace dev_attrs with dev_groups
Date: Fri, 25 Oct 2013 15:14:15 -0700	[thread overview]
Message-ID: <1382739255-25134-1-git-send-email-srinivas.pandruvada@linux.intel.com> (raw)

struct class no longer contains dev_attrs field. Replace dev_attrs
with dev_groups field.
This caused compile error on latest linux-next tree.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/powercap/powercap_sys.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index c22fa4c..af07211 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -471,17 +471,18 @@ static ssize_t enabled_store(struct device *dev,
 
 	return -ENOSYS;
 }
+static DEVICE_ATTR_RW(enabled);
 
-static struct device_attribute powercap_def_attrs[] = {
-		__ATTR(enabled, S_IWUSR | S_IRUGO, enabled_show,
-							enabled_store),
-		__ATTR_NULL
+static struct attribute *powercap_dev_attrs[] = {
+	&dev_attr_enabled.attr,
+	NULL
 };
+ATTRIBUTE_GROUPS(powercap_dev);
 
 static struct class powercap_class = {
 	.name = "powercap",
 	.dev_release = powercap_release,
-	.dev_attrs = powercap_def_attrs,
+	.dev_groups = powercap_dev_groups,
 };
 
 struct powercap_zone *powercap_register_zone(
-- 
1.8.3.1

             reply	other threads:[~2013-10-25 22:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-25 22:14 Srinivas Pandruvada [this message]
2013-10-25 22:30 ` [PATCH] PowerCap: Replace dev_attrs with dev_groups Randy Dunlap

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=1382739255-25134-1-git-send-email-srinivas.pandruvada@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=linux-next@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rdunlap@infradead.org \
    --cc=thierry.reding@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).