From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: linux-rtc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [PATCH v1 1/4] ACPI: TAD: Use __ATTRIBUTE_GROUPS() macro
Date: Wed, 22 Apr 2026 17:24:08 +0200 [thread overview]
Message-ID: <1961102.tdWV9SEqCh@rafael.j.wysocki> (raw)
In-Reply-To: <2415066.ElGaqSPkdT@rafael.j.wysocki>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Recent commit 93afe8ba9b01 ("ACPI: TAD: Use dev_groups in struct
device_driver") switched over the ACPI TAD driver to using device
attruibute groups instead of creating and removing the device sysfs
attributes directly, but it might go one step farther and use the
__ATTRIBUTE_GROUPS() macro which would reduce the code size slightly.
Do it now.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/acpi_tad.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- a/drivers/acpi/acpi_tad.c
+++ b/drivers/acpi/acpi_tad.c
@@ -605,15 +605,12 @@ static umode_t acpi_tad_attr_is_visible(
return 0;
}
-static const struct attribute_group acpi_tad_attr_group = {
+static const struct attribute_group acpi_tad_group = {
.attrs = acpi_tad_attrs,
.is_visible = acpi_tad_attr_is_visible,
};
-static const struct attribute_group *acpi_tad_attr_groups[] = {
- &acpi_tad_attr_group,
- NULL,
-};
+__ATTRIBUTE_GROUPS(acpi_tad);
#ifdef CONFIG_RTC_CLASS
/* RTC class device interface */
@@ -885,7 +882,7 @@ static struct platform_driver acpi_tad_d
.driver = {
.name = "acpi-tad",
.acpi_match_table = acpi_tad_ids,
- .dev_groups = acpi_tad_attr_groups,
+ .dev_groups = acpi_tad_groups,
},
.probe = acpi_tad_probe,
.remove = acpi_tad_remove,
next prev parent reply other threads:[~2026-04-22 15:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 15:23 [PATCH v1 0/4] ACPI: TAD: Fixes and cleanups on top of recent changes Rafael J. Wysocki
2026-04-22 15:24 ` Rafael J. Wysocki [this message]
2026-04-22 15:25 ` [PATCH v1 2/4] ACPI: TAD: Use devres for all driver cleanup Rafael J. Wysocki
2026-04-22 15:26 ` [PATCH v1 3/4] ACPI: TAD: RTC: Refine timer value computations and checks Rafael J. Wysocki
2026-04-22 15:27 ` [PATCH v1 4/4] ACPI: TAD: Fix up a comment in acpi_tad_probe() Rafael J. Wysocki
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=1961102.tdWV9SEqCh@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.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