Skip to content

Commit

Permalink
drivers/pcmcia/sa1111_badge4.c: avoid unused function warning
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
arndb authored and torvalds committed Nov 18, 2017
1 parent 64c349f commit d425824
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pcmcia/sa1111_badge4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -158,3 +159,4 @@ static int __init pcmv_setup(char *s)
}

__setup("pcmv=", pcmv_setup);
#endif

0 comments on commit d425824

Please sign in to comment.