lkml.org 
[lkml]   [2016]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/2] cpufreq: add new attribute type cpufreq_freq_attr_wr_perm()
Date
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
\
 
 \ /
  Last update: 2016-11-04 17:56    [W:0.376 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site