summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-30 22:22:44 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-31 09:38:10 (GMT)
commit309231d7a610554b02084ff7b465e43ef383a3bc (patch)
treeb878efbc3fd1cd16a6ecea26e1b8d4867ee2ef6f /drivers/staging/comedi/drivers.c
parent33782dd5edf8db3cdb7c81a3523bf743dd0209b7 (diff)
downloadlinux-fsl-qoriq-309231d7a610554b02084ff7b465e43ef383a3bc.tar.xz
staging: comedi: conditionally build in PCMCIA driver support
Separate the comedi_pcmcia_* functions out of drivers.c into a new source file, comedi_pcmcia.c. This allows conditionally building support for comedi pcmcia drivers into the comedi core without the need for the #if'defery. Fix the Kconfig and Makefile appropriately. Group all the comedi_pcmcia_* prototypes into one place in comedidev.h. Protect these prototypes with an #ifdef so that building a comedi pcmcia driver without PCMCIA support will cause a build error. This will normally not happen as long as the comedi pcmcia driver is placed in the proper group in the Kconfig. Remove the #include <pcmcia/*.h> from drivers.c. These includes are only needed by the comedi pcmcia driver support code and the pcmcia drivers. The include should occur in those files. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers.c')
-rw-r--r--drivers/staging/comedi/drivers.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 4e6e8a1..151e084 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -23,8 +23,6 @@
#include <linux/device.h>
#include <linux/module.h>
-#include <pcmcia/cistpl.h>
-#include <pcmcia/ds.h>
#include <linux/errno.h>
#include <linux/kconfig.h>
#include <linux/kernel.h>
@@ -494,33 +492,3 @@ void comedi_auto_unconfig(struct device *hardware_device)
comedi_free_board_minor(minor);
}
EXPORT_SYMBOL_GPL(comedi_auto_unconfig);
-
-#if IS_ENABLED(CONFIG_PCMCIA)
-int comedi_pcmcia_driver_register(struct comedi_driver *comedi_driver,
- struct pcmcia_driver *pcmcia_driver)
-{
- int ret;
-
- ret = comedi_driver_register(comedi_driver);
- if (ret < 0)
- return ret;
-
- ret = pcmcia_register_driver(pcmcia_driver);
- if (ret < 0) {
- comedi_driver_unregister(comedi_driver);
- return ret;
- }
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(comedi_pcmcia_driver_register);
-
-void comedi_pcmcia_driver_unregister(struct comedi_driver *comedi_driver,
- struct pcmcia_driver *pcmcia_driver)
-{
- pcmcia_unregister_driver(pcmcia_driver);
- comedi_driver_unregister(comedi_driver);
-}
-EXPORT_SYMBOL_GPL(comedi_pcmcia_driver_unregister);
-
-#endif