[Nbd] [PATCH 6/6] power: supply: make device_attribute const
- To: julia.lawall@...3043..., rjw@...3025..., lenb@...1285..., jbacik@...2204..., jikos@...1285..., benjamin.tissoires@...696..., manish.chopra@...3044..., rahul.verma@...3044..., Dept-GELinuxNICDev@...3044..., harish.patil@...3044..., cascardo@...3045..., don@...3046..., dvhart@...1270..., andy@...1270..., sre@...1285..., linux-acpi@...25..., linux-kernel@...25..., linux-block@...25..., nbd-general@lists.sourceforge.net, linux-input@...25..., netdev@...25..., platform-driver-x86@...25..., linux-pm@...25...
- Cc: Bhumika Goyal <bhumirks@...17...>
- Subject: [Nbd] [PATCH 6/6] power: supply: make device_attribute const
- From: Bhumika Goyal <bhumirks@...17...>
- Date: Mon, 21 Aug 2017 17:13:12 +0530
- Message-id: <1503315792-14837-7-git-send-email-bhumirks@...17...>
- In-reply-to: <1503315792-14837-1-git-send-email-bhumirks@...17...>
- References: <1503315792-14837-1-git-send-email-bhumirks@...17...>
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@...17...>
---
drivers/power/supply/olpc_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/olpc_battery.c b/drivers/power/supply/olpc_battery.c
index fc20ca3..3bc2eea 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,
--
1.9.1
Reply to: