提交 c023b906 编写于 作者: B Bhumika Goyal 提交者: Sebastian Reichel

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: NBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk>
上级 a865a155
...@@ -559,7 +559,7 @@ static ssize_t olpc_bat_error_read(struct device *dev, ...@@ -559,7 +559,7 @@ static ssize_t olpc_bat_error_read(struct device *dev,
return sprintf(buf, "%d\n", ec_byte); return sprintf(buf, "%d\n", ec_byte);
} }
static struct device_attribute olpc_bat_error = { static const struct device_attribute olpc_bat_error = {
.attr = { .attr = {
.name = "error", .name = "error",
.mode = S_IRUGO, .mode = S_IRUGO,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册