Skip to contentSkip to conversation

pcmcia: badge4: avoid unused function warning

PATCH New Arnd Bergmann 1 participant 1 message Jan 25, 2016 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcmcia: badge4: avoid unused function warning

The pcmv_setup is only used when the badge4 driver is built-in, but not when it is a loadable module:

drivers/pcmcia/sa1111_badge4.c:153:122: error: 'pcmv_setup' defined but not used [-Werror=unused-function]

This adds an #ifdef to avoid the definition of the unused function in the modular case.

---
 drivers/pcmcia/sa1111_badge4.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pcmcia/sa1111_badge4.c +2 -0
index 12f0dd091477..a57dc1042ba0 100644
@@ -150,6 +150,7 @@ int pcmcia_badge4_init(struct sa1111_dev *dev)
 	return ret;
 }
 
+#ifndef MODULE
 static int __init pcmv_setup(char *s)
 {
 	int v[4];
@@ -164,3 +165,4 @@ static int __init pcmv_setup(char *s)
 }
 
 __setup("pcmv=", pcmv_setup);
+#endif
Signature · 1 line
2.7.0