ACPI: make device_attribute const

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>
This commit is contained in:
Bhumika Goyal 2017-08-21 17:13:07 +05:30 коммит произвёл Rafael J. Wysocki
Родитель 14ccee78fc
Коммит 82d2b61058
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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,

Просмотреть файл

@ -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,