From: Heiner Kallweit <hkallweit1@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] sysfs: Add helper BIN_ATTRIBUTE_GROUPS
Date: Wed, 19 May 2021 18:33:14 +0200 [thread overview]
Message-ID: <e20db248-ed30-cf5d-a37c-b538dceaa5b2@gmail.com> (raw)
In-Reply-To: <66e9f6e5-fdee-6963-6131-228c69705350@gmail.com>
New helper BIN_ATTRIBUTE_GROUPS() does the same as ATTRIBUTE_GROUPS(),
just for binary attributes.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
include/linux/sysfs.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index d76a1ddf8..a12556a4b 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -162,6 +162,12 @@ static const struct attribute_group _name##_group = { \
}; \
__ATTRIBUTE_GROUPS(_name)
+#define BIN_ATTRIBUTE_GROUPS(_name) \
+static const struct attribute_group _name##_group = { \
+ .bin_attrs = _name##_attrs, \
+}; \
+__ATTRIBUTE_GROUPS(_name)
+
struct file;
struct vm_area_struct;
struct address_space;
--
2.31.1
next prev parent reply other threads:[~2021-05-19 16:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 16:32 [PATCH 0/2] eeprom: ee1004: Let device core handle attribute eeprom Heiner Kallweit
2021-05-19 16:33 ` Heiner Kallweit [this message]
2021-05-19 17:04 ` [PATCH 1/2] sysfs: Add helper BIN_ATTRIBUTE_GROUPS Greg Kroah-Hartman
2021-05-19 19:02 ` Heiner Kallweit
2021-05-21 18:41 ` Greg Kroah-Hartman
2021-05-21 18:41 ` Greg Kroah-Hartman
2021-05-21 18:45 ` Heiner Kallweit
2021-05-19 16:34 ` [PATCH 2/2] eeprom: ee1004: Let device core handle attribute eeprom Heiner Kallweit
2021-05-20 19:25 ` [PATCH v2] " Heiner Kallweit
2021-05-21 18:43 ` Heiner Kallweit
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=e20db248-ed30-cf5d-a37c-b538dceaa5b2@gmail.com \
--to=hkallweit1@gmail.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.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