aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-02-11 18:23:05 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-07 20:04:51 -0500
commita07e4156a2ee6359d31a44946d7ee7f85dbf6bca (patch)
tree1ab5ef1c8a0e9549b8e72af889ae0b5f5f660400 /drivers/acpi
parent6992f5334995af474c2b58d010d08bc597f0f2fe (diff)
sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes
These are the non-static sysfs attributes that exist on my test machine. Fix them to use sysfs_attr_init or sysfs_bin_attr_init as appropriate. It simply requires making a sysfs attribute present to see this. So this is a little bit tedious but otherwise not too bad. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/system.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index a206a12da78a..743f2445e2a1 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -101,6 +101,7 @@ static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
101 struct acpi_table_header *header = NULL; 101 struct acpi_table_header *header = NULL;
102 struct acpi_table_attr *attr = NULL; 102 struct acpi_table_attr *attr = NULL;
103 103
104 sysfs_attr_init(&table_attr->attr.attr);
104 if (table_header->signature[0] != '\0') 105 if (table_header->signature[0] != '\0')
105 memcpy(table_attr->name, table_header->signature, 106 memcpy(table_attr->name, table_header->signature,
106 ACPI_NAME_SIZE); 107 ACPI_NAME_SIZE);
@@ -475,6 +476,7 @@ void acpi_irq_stats_init(void)
475 goto fail; 476 goto fail;
476 strncpy(name, buffer, strlen(buffer) + 1); 477 strncpy(name, buffer, strlen(buffer) + 1);
477 478
479 sysfs_attr_init(&counter_attrs[i].attr);
478 counter_attrs[i].attr.name = name; 480 counter_attrs[i].attr.name = name;
479 counter_attrs[i].attr.mode = 0644; 481 counter_attrs[i].attr.mode = 0644;
480 counter_attrs[i].show = counter_show; 482 counter_attrs[i].show = counter_show;