From: Bhumika Goyal Date: Mon, 21 Aug 2017 11:43:12 +0000 (+0530) Subject: power: supply: make device_attribute const X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c023b90699c820452093e7f24fb9058900971fda;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git power: supply: 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 Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/olpc_battery.c b/drivers/power/supply/olpc_battery.c index fc20ca368e55..3bc2eea7b3b7 100644 --- a/drivers/power/supply/olpc_battery.c +++ b/drivers/power/supply/olpc_battery.c @@ -559,7 +559,7 @@ static ssize_t olpc_bat_error_read(struct device *dev, return sprintf(buf, "%d\n", ec_byte); } -static struct device_attribute olpc_bat_error = { +static const struct device_attribute olpc_bat_error = { .attr = { .name = "error", .mode = S_IRUGO,