linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Mayer <code@mmayer.net>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: Power Management List <linux-pm@vger.kernel.org>,
	Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Markus Mayer <mmayer@broadcom.com>
Subject: [PATCH v2 1/2] cpufreq: add new attribute type cpufreq_freq_attr_wr_perm()
Date: Fri,  4 Nov 2016 09:55:35 -0700	[thread overview]
Message-ID: <20161104165536.20088-2-code@mmayer.net> (raw)
In-Reply-To: <20161104165536.20088-1-code@mmayer.net>

From: Markus Mayer <mmayer@broadcom.com>

With the new attribute type, it is possible to create write-only
CPUfreq attributes.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
 include/linux/cpufreq.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 5fa55fc..ed09930 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -234,6 +234,10 @@ __ATTR(_name, _perm, show_##_name, NULL)
 static struct freq_attr _name =			\
 __ATTR(_name, 0644, show_##_name, store_##_name)
 
+#define cpufreq_freq_attr_wr_perm(_name, _perm)	\
+static struct freq_attr _name =			\
+__ATTR(_name, _perm, NULL, store_##_name)
+
 struct global_attr {
 	struct attribute attr;
 	ssize_t (*show)(struct kobject *kobj,
-- 
2.7.4


  reply	other threads:[~2016-11-04 16:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 16:55 [PATCH v2 0/2] cpufreq: stats: clear statistics Markus Mayer
2016-11-04 16:55 ` Markus Mayer [this message]
2016-11-07  4:33   ` [PATCH v2 1/2] cpufreq: add new attribute type cpufreq_freq_attr_wr_perm() Viresh Kumar
2016-11-07  4:35     ` Viresh Kumar
2016-11-04 16:55 ` [PATCH v2 2/2] cpufreq: stats: clear statistics Markus Mayer
2016-11-07  4:38   ` Viresh Kumar

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=20161104165536.20088-2-code@mmayer.net \
    --to=code@mmayer.net \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mmayer@broadcom.com \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.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 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).