From: Andy Shevchenko Date: Wed, 2 Jul 2025 08:01:08 +0000 (+0300) Subject: rtc: sysfs: use __ATTRIBUTE_GROUPS() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fed5aaeb4e94e0f071bf467f2bafd5ea6f093722;p=thirdparty%2Flinux.git 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 Link: https://lore.kernel.org/r/20250702080108.2722905-1-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c index bf98a89d0e4e2..4ab05e105a76b 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) {