Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1527753

[PATCH] driver core: add CLASS_ATTR_WO()

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH] driver core: add CLASS_ATTR_WO()
Date Tue, 22 Nov 2016 18:40:02 +0100
Message-ID <sGnd0-1Py-29@gated-at.bofh.it> (permalink)
X-Original-To linux-kernel@vger.kernel.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.1 (2016-10-04)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 21
Organization linux.* mail to news gateway
X-Original-Date Tue, 22 Nov 2016 18:31:49 +0100
X-Original-Message-ID <20161122173149.GA2841@kroah.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1527753

Show key headers only | View raw


Some class subsystems are open-coding CLASS_ATTR_WO because the driver
core never provided it.  Add the macro to device.h so that we can go
around and fix up the individual subsystems as needed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/device.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -465,6 +465,8 @@ struct class_attribute {
 	struct class_attribute class_attr_##_name = __ATTR_RW(_name)
 #define CLASS_ATTR_RO(_name) \
 	struct class_attribute class_attr_##_name = __ATTR_RO(_name)
+#define CLASS_ATTR_WO(_name) \
+	struct class_attribute class_attr_##_name = __ATTR_WO(_name)
 
 extern int __must_check class_create_file_ns(struct class *class,
 					     const struct class_attribute *attr,

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] driver core: add CLASS_ATTR_WO() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-22 18:40 +0100

csiph-web