Skip to content

Commit

Permalink
ACPI: make device_attribute const
Browse files Browse the repository at this point in the history
Make these const as they are only passed as an argument to the function
device_create_file and device_remove_file and the corresponding
arguments are of type const.
Done using Coccinelle

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Bhumika Goyal authored and Rafael J. Wysocki committed Aug 24, 2017
1 parent 14ccee7 commit 82d2b61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
return count;
}

static struct device_attribute alarm_attr = {
static const struct device_attribute alarm_attr = {
.attr = {.name = "alarm", .mode = 0644},
.show = acpi_battery_alarm_show,
.store = acpi_battery_alarm_store,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/sbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
return count;
}

static struct device_attribute alarm_attr = {
static const struct device_attribute alarm_attr = {
.attr = {.name = "alarm", .mode = 0644},
.show = acpi_battery_alarm_show,
.store = acpi_battery_alarm_store,
Expand Down

0 comments on commit 82d2b61

Please sign in to comment.