Skip to contentSkip to conversation

Input: axp20x-pek - make device attributes static

PATCH In review Ben Dooks (Codethink) 2 participants 2 messages Dec 17, 2019 – Dec 18, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: axp20x-pek - make device attributes static

The two device attrbitues are not declared outside this file so make them static to avoid the following warnings:

drivers/input/misc/axp20x-pek.c:194:1: warning: symbol 'dev_attr_startup' was not declared. Should it be static? drivers/input/misc/axp20x-pek.c:195:1: warning: symbol 'dev_attr_shutdown' was not declared. Should it be static?

---
Cc: Dmitry Torokhov <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/input/misc/axp20x-pek.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/input/misc/axp20x-pek.c +4 -3
index 17c1cca74498..4454f1e5a0d3 100644
@@ -191,9 +191,10 @@ static ssize_t axp20x_store_attr_shutdown(struct device *dev,
 				 axp20x_pek->info->shutdown_mask, buf, count);
 }
 
-DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup, axp20x_store_attr_startup);
-DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown,
-	    axp20x_store_attr_shutdown);
+static DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup,
+		   axp20x_store_attr_startup);
+static DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown,
+		   axp20x_store_attr_shutdown);
 
 static struct attribute *axp20x_attrs[] = {
 	&dev_attr_startup.attr,
Signature · 1 line
2.24.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ben Dooks (Codethink)

The two device attrbitues are not declared outside this file so make them static to avoid the following warnings:

drivers/input/misc/axp20x-pek.c:194:1: warning: symbol 'dev_attr_startup' was not declared. Should it be static? drivers/input/misc/axp20x-pek.c:195:1: warning: symbol 'dev_attr_shutdown' was not declared. Should it be static?

Quoted 6 lines

---
Cc: Dmitry Torokhov <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: [email protected]
Cc: [email protected]