diff options
author | Mithlesh Thukral <mithlesh@linsyssoft.com> | 2009-06-08 15:34:41 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 19:01:33 (GMT) |
commit | 0a85b6f0ab0d2edb0d41b32697111ce0e4f43496 (patch) | |
tree | 4a3d939afc8473f6eaa3c462da60e71b8e0ba879 /drivers/staging/comedi/kcomedilib | |
parent | df6785681be9f05435f4299b921c41397ea061a1 (diff) | |
download | linux-fsl-qoriq-0a85b6f0ab0d2edb0d41b32697111ce0e4f43496.tar.xz |
Staging: Comedi: Lindent changes to comdi driver in staging tree
Lindent changes to comdi driver in staging tree.
This patch is followed by the checkpatch.pl error fixes.
Did not make them part of this patch as the patch size is already huge.
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi/kcomedilib')
-rw-r--r-- | drivers/staging/comedi/kcomedilib/data.c | 12 | ||||
-rw-r--r-- | drivers/staging/comedi/kcomedilib/dio.c | 8 | ||||
-rw-r--r-- | drivers/staging/comedi/kcomedilib/get.c | 55 | ||||
-rw-r--r-- | drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 35 |
4 files changed, 56 insertions, 54 deletions
diff --git a/drivers/staging/comedi/kcomedilib/data.c b/drivers/staging/comedi/kcomedilib/data.c index d808556..aefc41a 100644 --- a/drivers/staging/comedi/kcomedilib/data.c +++ b/drivers/staging/comedi/kcomedilib/data.c @@ -29,7 +29,7 @@ #include <linux/delay.h> int comedi_data_write(void *dev, unsigned int subdev, unsigned int chan, - unsigned int range, unsigned int aref, unsigned int data) + unsigned int range, unsigned int aref, unsigned int data) { struct comedi_insn insn; @@ -44,7 +44,7 @@ int comedi_data_write(void *dev, unsigned int subdev, unsigned int chan, } int comedi_data_read(void *dev, unsigned int subdev, unsigned int chan, - unsigned int range, unsigned int aref, unsigned int *data) + unsigned int range, unsigned int aref, unsigned int *data) { struct comedi_insn insn; @@ -59,7 +59,8 @@ int comedi_data_read(void *dev, unsigned int subdev, unsigned int chan, } int comedi_data_read_hint(void *dev, unsigned int subdev, - unsigned int chan, unsigned int range, unsigned int aref) + unsigned int chan, unsigned int range, + unsigned int aref) { struct comedi_insn insn; unsigned int dummy_data; @@ -75,8 +76,9 @@ int comedi_data_read_hint(void *dev, unsigned int subdev, } int comedi_data_read_delayed(void *dev, unsigned int subdev, - unsigned int chan, unsigned int range, unsigned int aref, - unsigned int *data, unsigned int nano_sec) + unsigned int chan, unsigned int range, + unsigned int aref, unsigned int *data, + unsigned int nano_sec) { int retval; diff --git a/drivers/staging/comedi/kcomedilib/dio.c b/drivers/staging/comedi/kcomedilib/dio.c index 8595567..30192f3 100644 --- a/drivers/staging/comedi/kcomedilib/dio.c +++ b/drivers/staging/comedi/kcomedilib/dio.c @@ -27,7 +27,7 @@ #include <linux/string.h> int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan, - unsigned int io) + unsigned int io) { struct comedi_insn insn; @@ -42,7 +42,7 @@ int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan, } int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan, - unsigned int *val) + unsigned int *val) { struct comedi_insn insn; @@ -57,7 +57,7 @@ int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan, } int comedi_dio_write(void *dev, unsigned int subdev, unsigned int chan, - unsigned int val) + unsigned int val) { struct comedi_insn insn; @@ -72,7 +72,7 @@ int comedi_dio_write(void *dev, unsigned int subdev, unsigned int chan, } int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask, - unsigned int *bits) + unsigned int *bits) { struct comedi_insn insn; unsigned int data[2]; diff --git a/drivers/staging/comedi/kcomedilib/get.c b/drivers/staging/comedi/kcomedilib/get.c index b6b726a..6d84187 100644 --- a/drivers/staging/comedi/kcomedilib/get.c +++ b/drivers/staging/comedi/kcomedilib/get.c @@ -28,7 +28,7 @@ int comedi_get_n_subdevices(void *d) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; return dev->n_subdevices; } @@ -38,23 +38,23 @@ int comedi_get_version_code(void *d) return COMEDI_VERSION_CODE; } -const char *comedi_get_driver_name(void * d) +const char *comedi_get_driver_name(void *d) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; return dev->driver->driver_name; } -const char *comedi_get_board_name(void * d) +const char *comedi_get_board_name(void *d) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; return dev->board_name; } int comedi_get_subdevice_type(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; return s->type; @@ -62,7 +62,7 @@ int comedi_get_subdevice_type(void *d, unsigned int subdevice) unsigned int comedi_get_subdevice_flags(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; return s->subdev_flags; @@ -70,7 +70,7 @@ unsigned int comedi_get_subdevice_flags(void *d, unsigned int subdevice) int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; if (subd > dev->n_subdevices) return -ENODEV; @@ -84,7 +84,7 @@ int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd) int comedi_get_n_channels(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; return s->n_chan; @@ -92,16 +92,16 @@ int comedi_get_n_channels(void *d, unsigned int subdevice) int comedi_get_len_chanlist(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; return s->len_chanlist; } unsigned int comedi_get_maxdata(void *d, unsigned int subdevice, - unsigned int chan) + unsigned int chan) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; if (s->maxdata_list) @@ -111,10 +111,9 @@ unsigned int comedi_get_maxdata(void *d, unsigned int subdevice, } #ifdef KCOMEDILIB_DEPRECATED -int comedi_get_rangetype(void *d, unsigned int subdevice, - unsigned int chan) +int comedi_get_rangetype(void *d, unsigned int subdevice, unsigned int chan) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; int ret; @@ -132,7 +131,7 @@ int comedi_get_rangetype(void *d, unsigned int subdevice, int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; int ret; @@ -149,9 +148,9 @@ int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan) * ALPHA (non-portable) */ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan, - unsigned int range, struct comedi_krange *krange) + unsigned int range, struct comedi_krange *krange) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; const struct comedi_lrange *lr; @@ -173,7 +172,7 @@ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan, */ unsigned int comedi_get_buf_head_pos(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_async *async; @@ -186,7 +185,7 @@ unsigned int comedi_get_buf_head_pos(void *d, unsigned int subdevice) int comedi_get_buffer_contents(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_async *async; unsigned int num_bytes; @@ -204,9 +203,9 @@ int comedi_get_buffer_contents(void *d, unsigned int subdevice) * ALPHA */ int comedi_set_user_int_count(void *d, unsigned int subdevice, - unsigned int buf_user_count) + unsigned int buf_user_count) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_async *async; int num_bytes; @@ -225,9 +224,9 @@ int comedi_set_user_int_count(void *d, unsigned int subdevice, } int comedi_mark_buffer_read(void *d, unsigned int subdevice, - unsigned int num_bytes) + unsigned int num_bytes) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_async *async; @@ -244,9 +243,9 @@ int comedi_mark_buffer_read(void *d, unsigned int subdevice, } int comedi_mark_buffer_written(void *d, unsigned int subdevice, - unsigned int num_bytes) + unsigned int num_bytes) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_async *async; int bytes_written; @@ -265,7 +264,7 @@ int comedi_mark_buffer_written(void *d, unsigned int subdevice, int comedi_get_buffer_size(void *d, unsigned int subdev) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdev; struct comedi_async *async; @@ -280,7 +279,7 @@ int comedi_get_buffer_size(void *d, unsigned int subdev) int comedi_get_buffer_offset(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices + subdevice; struct comedi_async *async; diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index b39ea7c..6552ef6 100644 --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -67,7 +67,7 @@ void *comedi_open(const char *filename) if (!try_module_get(dev->driver->module)) return NULL; - return (void *) dev; + return (void *)dev; } void *comedi_open_old(unsigned int minor) @@ -86,12 +86,12 @@ void *comedi_open_old(unsigned int minor) if (dev == NULL || !dev->attached) return NULL; - return (void *) dev; + return (void *)dev; } int comedi_close(void *d) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; module_put(dev->driver->module); @@ -115,7 +115,7 @@ char *comedi_strerror(int err) int comedi_fileno(void *d) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; /* return something random */ return dev->minor; @@ -123,7 +123,7 @@ int comedi_fileno(void *d) int comedi_command(void *d, struct comedi_cmd *cmd) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; struct comedi_async *async; unsigned runflags; @@ -159,7 +159,7 @@ int comedi_command(void *d, struct comedi_cmd *cmd) int comedi_command_test(void *d, struct comedi_cmd *cmd) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; if (cmd->subdev >= dev->n_subdevices) @@ -181,7 +181,7 @@ int comedi_command_test(void *d, struct comedi_cmd *cmd) */ int comedi_do_insn(void *d, struct comedi_insn *insn) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; int ret = 0; @@ -214,7 +214,7 @@ int comedi_do_insn(void *d, struct comedi_insn *insn) } if (insn->subdev >= dev->n_subdevices) { printk("%d not usable subdevice\n", - insn->subdev); + insn->subdev); ret = -EINVAL; break; } @@ -296,7 +296,7 @@ int comedi_do_insn(void *d, struct comedi_insn *insn) goto error; } #endif - error: +error: return ret; } @@ -322,7 +322,7 @@ int comedi_do_insn(void *d, struct comedi_insn *insn) */ int comedi_lock(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; unsigned long flags; int ret = 0; @@ -365,7 +365,7 @@ int comedi_lock(void *d, unsigned int subdevice) */ int comedi_unlock(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; unsigned long flags; struct comedi_async *async; @@ -417,7 +417,7 @@ int comedi_unlock(void *d, unsigned int subdevice) */ int comedi_cancel(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; int ret = 0; @@ -456,9 +456,10 @@ int comedi_cancel(void *d, unsigned int subdevice) registration of callback functions */ int comedi_register_callback(void *d, unsigned int subdevice, - unsigned int mask, int (*cb) (unsigned int, void *), void *arg) + unsigned int mask, int (*cb) (unsigned int, + void *), void *arg) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; struct comedi_async *async; @@ -494,7 +495,7 @@ int comedi_register_callback(void *d, unsigned int subdevice, int comedi_poll(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s = dev->subdevices; struct comedi_async *async; @@ -521,7 +522,7 @@ int comedi_poll(void *d, unsigned int subdevice) /* WARNING: not portable */ int comedi_map(void *d, unsigned int subdevice, void *ptr) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; if (subdevice >= dev->n_subdevices) @@ -543,7 +544,7 @@ int comedi_map(void *d, unsigned int subdevice, void *ptr) /* WARNING: not portable */ int comedi_unmap(void *d, unsigned int subdevice) { - struct comedi_device *dev = (struct comedi_device *) d; + struct comedi_device *dev = (struct comedi_device *)d; struct comedi_subdevice *s; if (subdevice >= dev->n_subdevices) |