drivers/pcmcia/sa1111_badge4.c: avoid unused function warning
authorArnd Bergmann <[email protected]>
Fri, 17 Nov 2017 23:31:26 +0000 (15:31 -0800)
committerLinus Torvalds <[email protected]>
Sat, 18 Nov 2017 00:10:04 +0000 (16:10 -0800)
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.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/pcmcia/sa1111_badge4.c

index 2f490930430d46a2f7056aa9b5576266d21a4937..93a5c7423d8093728a6021a4956ca8ee18c97162 100644 (file)
@@ -144,6 +144,7 @@ int pcmcia_badge4_init(struct sa1111_dev *dev)
                                 sa11xx_drv_pcmcia_add_one);
 }
 
+#ifndef MODULE
 static int __init pcmv_setup(char *s)
 {
        int v[4];
@@ -158,3 +159,4 @@ static int __init pcmv_setup(char *s)
 }
 
 __setup("pcmv=", pcmv_setup);
+#endif