Skip to contentSkip to conversation

rtc: sysfs: use __ATTRIBUTE_GROUPS()

PATCH Applied Andy Shevchenko 2 participants 2 messages Jul 2, 2025 – Jul 23, 2025 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: sysfs: use __ATTRIBUTE_GROUPS()

Embrace __ATTRIBUTE_GROUPS() to avoid boiler plate code. This should not introduce any functional changes.

---
 drivers/rtc/sysfs.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/rtc/sysfs.c +1 -5
index 86d1140b4f39..2230241285d0 100644
@@ -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)
 {
Signature · 1 line
2.47.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Andy Shevchenko

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,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com