diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-23 14:05:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-23 15:55:03 -0400 |
commit | a0eeed40100b2eca57afdf99d76c57dedd218a8a (patch) | |
tree | cece34cb7c50006f934d7b65c6111d750488673d | |
parent | eca7cf725617c08f02a9f74155ced6d2de9f0a63 (diff) |
staging: comedi: ni_labpc: fix legacy driver build
CONFIG_COMEDI_NI_LABPC_ISA is a tristate option. #if IS_ENABLED()
needs to be used instead of #ifdef in order to build the legacy
specific code in this driver.
The local variable 'board' is not used in labpc_attach(). Remove it.
The labpc_detach() function is only referenced in this file. Make
it static.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index bb68d8fa83a3..3d978f34d212 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c | |||
@@ -234,7 +234,7 @@ static inline void labpc_writeb(unsigned int byte, unsigned long address) | |||
234 | writeb(byte, (void __iomem *)address); | 234 | writeb(byte, (void __iomem *)address); |
235 | } | 235 | } |
236 | 236 | ||
237 | #ifdef CONFIG_COMEDI_NI_LABPC_ISA | 237 | #if IS_ENABLED(CONFIG_COMEDI_NI_LABPC_ISA) |
238 | static const struct labpc_boardinfo labpc_boards[] = { | 238 | static const struct labpc_boardinfo labpc_boards[] = { |
239 | { | 239 | { |
240 | .name = "lab-pc-1200", | 240 | .name = "lab-pc-1200", |
@@ -1710,10 +1710,9 @@ void labpc_common_detach(struct comedi_device *dev) | |||
1710 | } | 1710 | } |
1711 | EXPORT_SYMBOL_GPL(labpc_common_detach); | 1711 | EXPORT_SYMBOL_GPL(labpc_common_detach); |
1712 | 1712 | ||
1713 | #ifdef CONFIG_COMEDI_NI_LABPC_ISA | 1713 | #if IS_ENABLED(CONFIG_COMEDI_NI_LABPC_ISA) |
1714 | static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) | 1714 | static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) |
1715 | { | 1715 | { |
1716 | const struct labpc_boardinfo *board = comedi_board(dev); | ||
1717 | struct labpc_private *devpriv; | 1716 | struct labpc_private *devpriv; |
1718 | unsigned int irq = it->options[1]; | 1717 | unsigned int irq = it->options[1]; |
1719 | unsigned int dma_chan = it->options[2]; | 1718 | unsigned int dma_chan = it->options[2]; |
@@ -1756,7 +1755,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
1756 | return 0; | 1755 | return 0; |
1757 | } | 1756 | } |
1758 | 1757 | ||
1759 | void labpc_detach(struct comedi_device *dev) | 1758 | static void labpc_detach(struct comedi_device *dev) |
1760 | { | 1759 | { |
1761 | struct labpc_private *devpriv = dev->private; | 1760 | struct labpc_private *devpriv = dev->private; |
1762 | 1761 | ||