diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-05 09:10:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:36:11 -0700 |
commit | c5efe58b83bc5c1d5811800faf03b1089d1ef054 (patch) | |
tree | c0b1dabb0bacaa4e87b4bd786120340885ce491e | |
parent | 1e18c0d5b41ff2b482f1b5178da4f69d3223261c (diff) | |
download | op-kernel-dev-c5efe58b83bc5c1d5811800faf03b1089d1ef054.zip op-kernel-dev-c5efe58b83bc5c1d5811800faf03b1089d1ef054.tar.gz |
Staging: comedi: 8255: fix up previous static markings.
Ian pointed out that exported symbols should not be marked as static :)
Fixed this up by properly including the 8255.h file, and fixing
the function prototypes there, as the CONFIG variables were not getting
set so users of the header file were seeing the incorrect function
prototypes.
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/comedi/drivers/8255.c | 22 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/8255.h | 22 |
2 files changed, 10 insertions, 34 deletions
diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c index e777ddf..b2e80dd 100644 --- a/drivers/staging/comedi/drivers/8255.c +++ b/drivers/staging/comedi/drivers/8255.c @@ -82,6 +82,7 @@ I/O port base address can be found in the output of 'lspci -v'. #include <linux/ioport.h> #include <linux/slab.h> +#include "8255.h" #define _8255_SIZE 4 @@ -120,8 +121,8 @@ COMEDI_INITCLEANUP(driver_8255); static void do_config(struct comedi_device *dev, struct comedi_subdevice *s); -static void subdev_8255_interrupt(struct comedi_device *dev, - struct comedi_subdevice *s) +void subdev_8255_interrupt(struct comedi_device *dev, + struct comedi_subdevice *s) { short d; @@ -319,10 +320,9 @@ static int subdev_8255_cancel(struct comedi_device *dev, return 0; } -static int subdev_8255_init(struct comedi_device *dev, - struct comedi_subdevice *s, - int (*cb) (int, int, int, unsigned long), - unsigned long arg) +int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s, + int (*cb) (int, int, int, unsigned long), + unsigned long arg) { s->type = COMEDI_SUBD_DIO; s->subdev_flags = SDF_READABLE | SDF_WRITABLE; @@ -350,10 +350,9 @@ static int subdev_8255_init(struct comedi_device *dev, } EXPORT_SYMBOL(subdev_8255_init); -static int subdev_8255_init_irq(struct comedi_device *dev, - struct comedi_subdevice *s, - int (*cb) (int, int, int, unsigned long), - unsigned long arg) +int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice *s, + int (*cb) (int, int, int, unsigned long), + unsigned long arg) { int ret; @@ -371,8 +370,7 @@ static int subdev_8255_init_irq(struct comedi_device *dev, } EXPORT_SYMBOL(subdev_8255_init_irq); -static void subdev_8255_cleanup(struct comedi_device *dev, - struct comedi_subdevice *s) +void subdev_8255_cleanup(struct comedi_device *dev, struct comedi_subdevice *s) { if (s->private) { /* this test does nothing, so comment it out diff --git a/drivers/staging/comedi/drivers/8255.h b/drivers/staging/comedi/drivers/8255.h index 02c5a36..b6314c9 100644 --- a/drivers/staging/comedi/drivers/8255.h +++ b/drivers/staging/comedi/drivers/8255.h @@ -26,8 +26,6 @@ #include "../comedidev.h" -#if defined(CONFIG_COMEDI_8255) || defined(CONFIG_COMEDI_8255_MODULE) - int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s, int (*cb) (int, int, int, unsigned long), unsigned long arg); @@ -38,24 +36,4 @@ void subdev_8255_cleanup(struct comedi_device *dev, struct comedi_subdevice *s); void subdev_8255_interrupt(struct comedi_device *dev, struct comedi_subdevice *s); -#else - -static inline int subdev_8255_init(struct comedi_device *dev, - struct comedi_subdevice *s, void *x, - unsigned long y) -{ - printk("8255 support not configured -- disabling subdevice\n"); - - s->type = COMEDI_SUBD_UNUSED; - - return 0; -} - -static inline void subdev_8255_cleanup(struct comedi_device *dev, - struct comedi_subdevice *s) -{ -} - -#endif - #endif |