* [PATCH v1 1/1] rtc: sysfs: use __ATTRIBUTE_GROUPS()
@ 2025-07-02 8:01 Andy Shevchenko
2025-07-23 16:54 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2025-07-02 8:01 UTC (permalink / raw)
To: Andy Shevchenko, linux-rtc, linux-kernel; +Cc: Alexandre Belloni
Embrace __ATTRIBUTE_GROUPS() to avoid boiler plate code.
This should not introduce any functional changes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/rtc/sysfs.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c
index 86d1140b4f39..2230241285d0 100644
--- a/drivers/rtc/sysfs.c
+++ b/drivers/rtc/sysfs.c
@@ -298,11 +298,7 @@ static struct attribute_group rtc_attr_group = {
.is_visible = rtc_attr_is_visible,
.attrs = rtc_attrs,
};
-
-static const struct attribute_group *rtc_attr_groups[] = {
- &rtc_attr_group,
- NULL
-};
+__ATTRIBUTE_GROUPS(rtc_attr);
const struct attribute_group **rtc_get_dev_attribute_groups(void)
{
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] rtc: sysfs: use __ATTRIBUTE_GROUPS()
2025-07-02 8:01 [PATCH v1 1/1] rtc: sysfs: use __ATTRIBUTE_GROUPS() Andy Shevchenko
@ 2025-07-23 16:54 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2025-07-23 16:54 UTC (permalink / raw)
To: linux-rtc, linux-kernel, Andy Shevchenko
On Wed, 02 Jul 2025 11:01:08 +0300, Andy Shevchenko wrote:
> Embrace __ATTRIBUTE_GROUPS() to avoid boiler plate code.
> This should not introduce any functional changes.
>
>
Applied, thanks!
[1/1] rtc: sysfs: use __ATTRIBUTE_GROUPS()
https://git.kernel.org/abelloni/c/fed5aaeb4e94
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-23 17:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 8:01 [PATCH v1 1/1] rtc: sysfs: use __ATTRIBUTE_GROUPS() Andy Shevchenko
2025-07-23 16:54 ` Alexandre Belloni
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).