Skip to content

Commit

Permalink
power: supply: 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 <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
goyalbhumika authored and sre committed Aug 28, 2017
1 parent a865a15 commit c023b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/supply/olpc_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c023b90

Please sign in to comment.