mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pcmcia: badge4: avoid unused function warning
@ 2016-01-25 15:57 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2016-01-25 15:57 UTC (permalink / raw)
  To: linux-pcmcia
  Cc: linux-arm-kernel, Dmitry Eremin-Solenikov, Linus Walleij,
	Russell King, Arnd Bergmann, linux-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pcmcia/sa1111_badge4.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pcmcia/sa1111_badge4.c b/drivers/pcmcia/sa1111_badge4.c
index 12f0dd091477..a57dc1042ba0 100644
--- a/drivers/pcmcia/sa1111_badge4.c
+++ b/drivers/pcmcia/sa1111_badge4.c
@@ -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
-- 
2.7.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-25 15:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 15:57 [PATCH] pcmcia: badge4: avoid unused function warning Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®