Commit e0dcef71 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: comedi: fix up a lot of checkpatch.pl warnings

Only clean up some of the easier ones in the .h files

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ed9eccbe
This diff is collapsed.
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
extern long comedi_compat_ioctl(struct file *file, unsigned int cmd, extern long comedi_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg); unsigned long arg);
#define comedi_register_ioctl32() do{}while(0) #define comedi_register_ioctl32() do {} while (0)
#define comedi_unregister_ioctl32() do{}while(0) #define comedi_unregister_ioctl32() do {} while (0)
#else /* HAVE_COMPAT_IOCTL */ #else /* HAVE_COMPAT_IOCTL */
...@@ -50,8 +50,8 @@ extern void comedi_unregister_ioctl32(void); ...@@ -50,8 +50,8 @@ extern void comedi_unregister_ioctl32(void);
#else /* CONFIG_COMPAT */ #else /* CONFIG_COMPAT */
#define comedi_compat_ioctl 0 /* NULL */ #define comedi_compat_ioctl 0 /* NULL */
#define comedi_register_ioctl32() do{}while(0) #define comedi_register_ioctl32() do {} while (0)
#define comedi_unregister_ioctl32() do{}while(0) #define comedi_unregister_ioctl32() do {} while (0)
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
extern struct class *comedi_class; extern struct class *comedi_class;
extern const struct file_operations comedi_fops; extern const struct file_operations comedi_fops;
#endif //_COMEDI_FOPS_H #endif /* _COMEDI_FOPS_H */
...@@ -45,13 +45,13 @@ ...@@ -45,13 +45,13 @@
#ifdef CONFIG_COMEDI_RTL #ifdef CONFIG_COMEDI_RTL
#include <rtl_core.h> #include <rtl_core.h>
#include <rtl_time.h> #include <rtl_time.h>
//#ifdef RTLINUX_VERSION_CODE /* #ifdef RTLINUX_VERSION_CODE */
#include <rtl_sync.h> #include <rtl_sync.h>
//#endif /* #endif */
#define rt_printk rtl_printf #define rt_printk rtl_printf
#endif #endif
#ifdef CONFIG_COMEDI_FUSION #ifdef CONFIG_COMEDI_FUSION
#define rt_printk(format, args...) printk(format , ## args ) #define rt_printk(format, args...) printk(format , ## args)
#endif /* CONFIG_COMEDI_FUSION */ #endif /* CONFIG_COMEDI_FUSION */
#ifdef CONFIG_PRIORITY_IRQ #ifdef CONFIG_PRIORITY_IRQ
#define rt_printk printk #define rt_printk printk
...@@ -59,27 +59,27 @@ ...@@ -59,27 +59,27 @@
int comedi_request_irq(unsigned int irq, irqreturn_t(*handler) (int, int comedi_request_irq(unsigned int irq, irqreturn_t(*handler) (int,
void *PT_REGS_ARG), unsigned long flags, const char *device, void *PT_REGS_ARG), unsigned long flags, const char *device,
comedi_device * dev_id); comedi_device *dev_id);
void comedi_free_irq(unsigned int irq, comedi_device * dev_id); void comedi_free_irq(unsigned int irq, comedi_device *dev_id);
void comedi_rt_init(void); void comedi_rt_init(void);
void comedi_rt_cleanup(void); void comedi_rt_cleanup(void);
int comedi_switch_to_rt(comedi_device * dev); int comedi_switch_to_rt(comedi_device *dev);
void comedi_switch_to_non_rt(comedi_device * dev); void comedi_switch_to_non_rt(comedi_device *dev);
void comedi_rt_pend_wakeup(wait_queue_head_t * q); void comedi_rt_pend_wakeup(wait_queue_head_t *q);
extern int rt_pend_call(void (*func) (int arg1, void *arg2), int arg1, extern int rt_pend_call(void (*func) (int arg1, void *arg2), int arg1,
void *arg2); void *arg2);
#else #else
#define comedi_request_irq(a,b,c,d,e) request_irq(a,b,c,d,e) #define comedi_request_irq(a, b, c, d, e) request_irq(a, b, c, d, e)
#define comedi_free_irq(a,b) free_irq(a,b) #define comedi_free_irq(a, b) free_irq(a, b)
#define comedi_rt_init() do{}while(0) #define comedi_rt_init() do {} while (0)
#define comedi_rt_cleanup() do{}while(0) #define comedi_rt_cleanup() do {} while (0)
#define comedi_switch_to_rt(a) (-1) #define comedi_switch_to_rt(a) (-1)
#define comedi_switch_to_non_rt(a) do{}while(0) #define comedi_switch_to_non_rt(a) do {} while (0)
#define comedi_rt_pend_wakeup(a) do{}while(0) #define comedi_rt_pend_wakeup(a) do {} while (0)
#define rt_printk(format,args...) printk(format,##args) #define rt_printk(format, args...) printk(format, ##args)
#endif #endif
...@@ -89,7 +89,7 @@ extern int rt_pend_call(void (*func) (int arg1, void *arg2), int arg1, ...@@ -89,7 +89,7 @@ extern int rt_pend_call(void (*func) (int arg1, void *arg2), int arg1,
#define comedi_spin_lock_irqsave(lock_ptr, flags) \ #define comedi_spin_lock_irqsave(lock_ptr, flags) \
(flags = __comedi_spin_lock_irqsave(lock_ptr)) (flags = __comedi_spin_lock_irqsave(lock_ptr))
static inline unsigned long __comedi_spin_lock_irqsave(spinlock_t * lock_ptr) static inline unsigned long __comedi_spin_lock_irqsave(spinlock_t *lock_ptr)
{ {
unsigned long flags; unsigned long flags;
...@@ -112,7 +112,7 @@ static inline unsigned long __comedi_spin_lock_irqsave(spinlock_t * lock_ptr) ...@@ -112,7 +112,7 @@ static inline unsigned long __comedi_spin_lock_irqsave(spinlock_t * lock_ptr)
return flags; return flags;
} }
static inline void comedi_spin_unlock_irqrestore(spinlock_t * lock_ptr, static inline void comedi_spin_unlock_irqrestore(spinlock_t *lock_ptr,
unsigned long flags) unsigned long flags)
{ {
......
This diff is collapsed.
...@@ -41,13 +41,13 @@ typedef void comedi_t; ...@@ -41,13 +41,13 @@ typedef void comedi_t;
/* these functions may not be called at real-time priority */ /* these functions may not be called at real-time priority */
comedi_t *comedi_open(const char *path); comedi_t *comedi_open(const char *path);
int comedi_close(comedi_t * dev); int comedi_close(comedi_t *dev);
/* these functions may be called at any priority, but may fail at /* these functions may be called at any priority, but may fail at
real-time priority */ real-time priority */
int comedi_lock(comedi_t * dev, unsigned int subdev); int comedi_lock(comedi_t *dev, unsigned int subdev);
int comedi_unlock(comedi_t * dev, unsigned int subdev); int comedi_unlock(comedi_t *dev, unsigned int subdev);
/* these functions may be called at any priority, but you must hold /* these functions may be called at any priority, but you must hold
the lock for the subdevice */ the lock for the subdevice */
...@@ -56,68 +56,68 @@ int comedi_loglevel(int loglevel); ...@@ -56,68 +56,68 @@ int comedi_loglevel(int loglevel);
void comedi_perror(const char *s); void comedi_perror(const char *s);
char *comedi_strerror(int errnum); char *comedi_strerror(int errnum);
int comedi_errno(void); int comedi_errno(void);
int comedi_fileno(comedi_t * dev); int comedi_fileno(comedi_t *dev);
int comedi_cancel(comedi_t * dev, unsigned int subdev); int comedi_cancel(comedi_t *dev, unsigned int subdev);
int comedi_register_callback(comedi_t * dev, unsigned int subdev, int comedi_register_callback(comedi_t *dev, unsigned int subdev,
unsigned int mask, int (*cb) (unsigned int, void *), void *arg); unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
int comedi_command(comedi_t * dev, comedi_cmd * cmd); int comedi_command(comedi_t *dev, comedi_cmd *cmd);
int comedi_command_test(comedi_t * dev, comedi_cmd * cmd); int comedi_command_test(comedi_t *dev, comedi_cmd *cmd);
int comedi_trigger(comedi_t * dev, unsigned int subdev, comedi_trig * it); int comedi_trigger(comedi_t *dev, unsigned int subdev, comedi_trig *it);
int __comedi_trigger(comedi_t * dev, unsigned int subdev, comedi_trig * it); int __comedi_trigger(comedi_t *dev, unsigned int subdev, comedi_trig *it);
int comedi_data_write(comedi_t * dev, unsigned int subdev, unsigned int chan, int comedi_data_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, lsampl_t data); unsigned int range, unsigned int aref, lsampl_t data);
int comedi_data_read(comedi_t * dev, unsigned int subdev, unsigned int chan, int comedi_data_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, lsampl_t * data); unsigned int range, unsigned int aref, lsampl_t *data);
int comedi_data_read_hint(comedi_t * dev, unsigned int subdev, int comedi_data_read_hint(comedi_t *dev, unsigned int subdev,
unsigned int chan, unsigned int range, unsigned int aref); unsigned int chan, unsigned int range, unsigned int aref);
int comedi_data_read_delayed(comedi_t * dev, unsigned int subdev, int comedi_data_read_delayed(comedi_t *dev, unsigned int subdev,
unsigned int chan, unsigned int range, unsigned int aref, unsigned int chan, unsigned int range, unsigned int aref,
lsampl_t * data, unsigned int nano_sec); lsampl_t *data, unsigned int nano_sec);
int comedi_dio_config(comedi_t * dev, unsigned int subdev, unsigned int chan, int comedi_dio_config(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int io); unsigned int io);
int comedi_dio_read(comedi_t * dev, unsigned int subdev, unsigned int chan, int comedi_dio_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int *val); unsigned int *val);
int comedi_dio_write(comedi_t * dev, unsigned int subdev, unsigned int chan, int comedi_dio_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
unsigned int val); unsigned int val);
int comedi_dio_bitfield(comedi_t * dev, unsigned int subdev, unsigned int mask, int comedi_dio_bitfield(comedi_t *dev, unsigned int subdev, unsigned int mask,
unsigned int *bits); unsigned int *bits);
int comedi_get_n_subdevices(comedi_t * dev); int comedi_get_n_subdevices(comedi_t *dev);
int comedi_get_version_code(comedi_t * dev); int comedi_get_version_code(comedi_t *dev);
const char *comedi_get_driver_name(comedi_t * dev); const char *comedi_get_driver_name(comedi_t *dev);
const char *comedi_get_board_name(comedi_t * dev); const char *comedi_get_board_name(comedi_t *dev);
int comedi_get_subdevice_type(comedi_t * dev, unsigned int subdevice); int comedi_get_subdevice_type(comedi_t *dev, unsigned int subdevice);
int comedi_find_subdevice_by_type(comedi_t * dev, int type, unsigned int subd); int comedi_find_subdevice_by_type(comedi_t *dev, int type, unsigned int subd);
int comedi_get_n_channels(comedi_t * dev, unsigned int subdevice); int comedi_get_n_channels(comedi_t *dev, unsigned int subdevice);
lsampl_t comedi_get_maxdata(comedi_t * dev, unsigned int subdevice, unsigned lsampl_t comedi_get_maxdata(comedi_t *dev, unsigned int subdevice, unsigned
int chan); int chan);
int comedi_get_n_ranges(comedi_t * dev, unsigned int subdevice, unsigned int int comedi_get_n_ranges(comedi_t *dev, unsigned int subdevice, unsigned int
chan); chan);
int comedi_do_insn(comedi_t * dev, comedi_insn * insn); int comedi_do_insn(comedi_t *dev, comedi_insn *insn);
int comedi_poll(comedi_t * dev, unsigned int subdev); int comedi_poll(comedi_t *dev, unsigned int subdev);
/* DEPRECATED functions */ /* DEPRECATED functions */
int comedi_get_rangetype(comedi_t * dev, unsigned int subdevice, int comedi_get_rangetype(comedi_t *dev, unsigned int subdevice,
unsigned int chan); unsigned int chan);
/* ALPHA functions */ /* ALPHA functions */
unsigned int comedi_get_subdevice_flags(comedi_t * dev, unsigned int subdevice); unsigned int comedi_get_subdevice_flags(comedi_t *dev, unsigned int subdevice);
int comedi_get_len_chanlist(comedi_t * dev, unsigned int subdevice); int comedi_get_len_chanlist(comedi_t *dev, unsigned int subdevice);
int comedi_get_krange(comedi_t * dev, unsigned int subdevice, unsigned int int comedi_get_krange(comedi_t *dev, unsigned int subdevice, unsigned int
chan, unsigned int range, comedi_krange * krange); chan, unsigned int range, comedi_krange *krange);
unsigned int comedi_get_buf_head_pos(comedi_t * dev, unsigned int subdevice); unsigned int comedi_get_buf_head_pos(comedi_t *dev, unsigned int subdevice);
int comedi_set_user_int_count(comedi_t * dev, unsigned int subdevice, int comedi_set_user_int_count(comedi_t *dev, unsigned int subdevice,
unsigned int buf_user_count); unsigned int buf_user_count);
int comedi_map(comedi_t * dev, unsigned int subdev, void *ptr); int comedi_map(comedi_t *dev, unsigned int subdev, void *ptr);
int comedi_unmap(comedi_t * dev, unsigned int subdev); int comedi_unmap(comedi_t *dev, unsigned int subdev);
int comedi_get_buffer_size(comedi_t * dev, unsigned int subdev); int comedi_get_buffer_size(comedi_t *dev, unsigned int subdev);
int comedi_mark_buffer_read(comedi_t * dev, unsigned int subdevice, int comedi_mark_buffer_read(comedi_t *dev, unsigned int subdevice,
unsigned int num_bytes); unsigned int num_bytes);
int comedi_mark_buffer_written(comedi_t * d, unsigned int subdevice, int comedi_mark_buffer_written(comedi_t *d, unsigned int subdevice,
unsigned int num_bytes); unsigned int num_bytes);
int comedi_get_buffer_contents(comedi_t * dev, unsigned int subdevice); int comedi_get_buffer_contents(comedi_t *dev, unsigned int subdevice);
int comedi_get_buffer_offset(comedi_t * dev, unsigned int subdevice); int comedi_get_buffer_offset(comedi_t *dev, unsigned int subdevice);
#else #else
...@@ -139,14 +139,14 @@ int comedi_cancel(unsigned int minor, unsigned int subdev); ...@@ -139,14 +139,14 @@ int comedi_cancel(unsigned int minor, unsigned int subdev);
int comedi_register_callback(unsigned int minor, unsigned int subdev, int comedi_register_callback(unsigned int minor, unsigned int subdev,
unsigned int mask, int (*cb) (unsigned int, void *), void *arg); unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
int comedi_command(unsigned int minor, comedi_cmd * cmd); int comedi_command(unsigned int minor, comedi_cmd *cmd);
int comedi_command_test(unsigned int minor, comedi_cmd * cmd); int comedi_command_test(unsigned int minor, comedi_cmd *cmd);
int comedi_trigger(unsigned int minor, unsigned int subdev, comedi_trig * it); int comedi_trigger(unsigned int minor, unsigned int subdev, comedi_trig *it);
int __comedi_trigger(unsigned int minor, unsigned int subdev, comedi_trig * it); int __comedi_trigger(unsigned int minor, unsigned int subdev, comedi_trig *it);
int comedi_data_write(unsigned int dev, unsigned int subdev, unsigned int chan, int comedi_data_write(unsigned int dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, lsampl_t data); unsigned int range, unsigned int aref, lsampl_t data);
int comedi_data_read(unsigned int dev, unsigned int subdev, unsigned int chan, int comedi_data_read(unsigned int dev, unsigned int subdev, unsigned int chan,
unsigned int range, unsigned int aref, lsampl_t * data); unsigned int range, unsigned int aref, lsampl_t *data);
int comedi_dio_config(unsigned int dev, unsigned int subdev, unsigned int chan, int comedi_dio_config(unsigned int dev, unsigned int subdev, unsigned int chan,
unsigned int io); unsigned int io);
int comedi_dio_read(unsigned int dev, unsigned int subdev, unsigned int chan, int comedi_dio_read(unsigned int dev, unsigned int subdev, unsigned int chan,
...@@ -167,7 +167,7 @@ lsampl_t comedi_get_maxdata(unsigned int minor, unsigned int subdevice, unsigned ...@@ -167,7 +167,7 @@ lsampl_t comedi_get_maxdata(unsigned int minor, unsigned int subdevice, unsigned
int chan); int chan);
int comedi_get_n_ranges(unsigned int minor, unsigned int subdevice, unsigned int int comedi_get_n_ranges(unsigned int minor, unsigned int subdevice, unsigned int
chan); chan);
int comedi_do_insn(unsigned int minor, comedi_insn * insn); int comedi_do_insn(unsigned int minor, comedi_insn *insn);
int comedi_poll(unsigned int minor, unsigned int subdev); int comedi_poll(unsigned int minor, unsigned int subdev);
/* DEPRECATED functions */ /* DEPRECATED functions */
...@@ -179,7 +179,7 @@ unsigned int comedi_get_subdevice_flags(unsigned int minor, unsigned int ...@@ -179,7 +179,7 @@ unsigned int comedi_get_subdevice_flags(unsigned int minor, unsigned int
subdevice); subdevice);
int comedi_get_len_chanlist(unsigned int minor, unsigned int subdevice); int comedi_get_len_chanlist(unsigned int minor, unsigned int subdevice);
int comedi_get_krange(unsigned int minor, unsigned int subdevice, unsigned int int comedi_get_krange(unsigned int minor, unsigned int subdevice, unsigned int
chan, unsigned int range, comedi_krange * krange); chan, unsigned int range, comedi_krange *krange);
unsigned int comedi_get_buf_head_pos(unsigned int minor, unsigned int unsigned int comedi_get_buf_head_pos(unsigned int minor, unsigned int
subdevice); subdevice);
int comedi_set_user_int_count(unsigned int minor, unsigned int subdevice, int comedi_set_user_int_count(unsigned int minor, unsigned int subdevice,
......
...@@ -19,13 +19,7 @@ ...@@ -19,13 +19,7 @@
#ifndef __COMPAT_LINUX_WRAPPER_H_ #ifndef __COMPAT_LINUX_WRAPPER_H_
#define __COMPAT_LINUX_WRAPPER_H_ #define __COMPAT_LINUX_WRAPPER_H_
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags)) #define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags))
#define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags)) #define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags))
#else
#include_next <linux/wrapper.h>
#endif
#endif /* __COMPAT_LINUX_WRAPPER_H_ */ #endif /* __COMPAT_LINUX_WRAPPER_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment