Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ACPI: TAD: Use __ATTRIBUTE_GROUPS() macro

Recent commit 93afe8ba9b01 ("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>

+3 -6
+3 -6
drivers/acpi/acpi_tad.c
··· 605 605 return 0; 606 606 } 607 607 608 - static const struct attribute_group acpi_tad_attr_group = { 608 + static const struct attribute_group acpi_tad_group = { 609 609 .attrs = acpi_tad_attrs, 610 610 .is_visible = acpi_tad_attr_is_visible, 611 611 }; 612 612 613 - static const struct attribute_group *acpi_tad_attr_groups[] = { 614 - &acpi_tad_attr_group, 615 - NULL, 616 - }; 613 + __ATTRIBUTE_GROUPS(acpi_tad); 617 614 618 615 #ifdef CONFIG_RTC_CLASS 619 616 /* RTC class device interface */ ··· 882 885 .driver = { 883 886 .name = "acpi-tad", 884 887 .acpi_match_table = acpi_tad_ids, 885 - .dev_groups = acpi_tad_attr_groups, 888 + .dev_groups = acpi_tad_groups, 886 889 }, 887 890 .probe = acpi_tad_probe, 888 891 .remove = acpi_tad_remove,