[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250702080108.2722905-1-andriy.shevchenko@linux.intel.com>
Date: Wed, 2 Jul 2025 11:01:08 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-rtc@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
Subject: [PATCH v1 1/1] rtc: sysfs: use __ATTRIBUTE_GROUPS()
Embrace __ATTRIBUTE_GROUPS() to avoid boiler plate code.
This should not introduce any functional changes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.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
Powered by blists - more mailing lists