Skip to content

Commit 88b2670

Browse files
committed
ACPI: TAD: Use __ATTRIBUTE_GROUPS() macro
Recent commit 93afe8b ("ACPI: TAD: Use dev_groups in struct device_driver") switched over the ACPI TAD driver to using device attribute 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> [ rjw: Fixed typo in the changelog ] Link: https://patch.msgid.link/1961102.tdWV9SEqCh@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 254f496 commit 88b2670

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

drivers/acpi/acpi_tad.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,15 +605,12 @@ static umode_t acpi_tad_attr_is_visible(struct kobject *kobj,
605605
return 0;
606606
}
607607

608-
static const struct attribute_group acpi_tad_attr_group = {
608+
static const struct attribute_group acpi_tad_group = {
609609
.attrs = acpi_tad_attrs,
610610
.is_visible = acpi_tad_attr_is_visible,
611611
};
612612

613-
static const struct attribute_group *acpi_tad_attr_groups[] = {
614-
&acpi_tad_attr_group,
615-
NULL,
616-
};
613+
__ATTRIBUTE_GROUPS(acpi_tad);
617614

618615
#ifdef CONFIG_RTC_CLASS
619616
/* RTC class device interface */
@@ -885,7 +882,7 @@ static struct platform_driver acpi_tad_driver = {
885882
.driver = {
886883
.name = "acpi-tad",
887884
.acpi_match_table = acpi_tad_ids,
888-
.dev_groups = acpi_tad_attr_groups,
885+
.dev_groups = acpi_tad_groups,
889886
},
890887
.probe = acpi_tad_probe,
891888
.remove = acpi_tad_remove,

0 commit comments

Comments
 (0)