diff options
author | Andrea Gelmini <andrea.gelmini@gelma.net> | 2010-02-26 12:14:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-04 18:59:01 +0300 |
commit | 6705b68d0be284e2f9949f3657ea65d426d0f988 (patch) | |
tree | d65b74c226a7545ff1ada7c4d3b40d3b965a675d /drivers/staging | |
parent | 639b9f1ee5987270be2bca4bf8b7e6110d3b47ec (diff) | |
download | linux-6705b68d0be284e2f9949f3657ea65d426d0f988.tar.xz |
Staging: comedi: comedi_fops.c: Checkpatch cleanup
ERROR: do not initialise externals to 0 or NULL
+int comedi_num_legacy_minors = 0;
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_READ) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_WRITE) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 8117748ad5a5..aca96747e5e2 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644); int comedi_autoconfig = 1; module_param(comedi_autoconfig, bool, 0444); -int comedi_num_legacy_minors = 0; +int comedi_num_legacy_minors; module_param(comedi_num_legacy_minors, int, 0444); static DEFINE_SPINLOCK(comedi_file_info_table_lock); @@ -1510,7 +1510,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) } static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes, - loff_t * offset) + loff_t *offset) { struct comedi_subdevice *s; struct comedi_async *async; @@ -1612,7 +1612,7 @@ done: } static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes, - loff_t * offset) + loff_t *offset) { struct comedi_subdevice *s; struct comedi_async *async; @@ -2004,12 +2004,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s) if (async->cb_mask & s->async->events) { if (comedi_get_subdevice_runflags(s) & SRF_USER) { wake_up_interruptible(&async->wait_head); - if (s->subdev_flags & SDF_CMD_READ) { + if (s->subdev_flags & SDF_CMD_READ) kill_fasync(&dev->async_queue, SIGIO, POLL_IN); - } - if (s->subdev_flags & SDF_CMD_WRITE) { + if (s->subdev_flags & SDF_CMD_WRITE) kill_fasync(&dev->async_queue, SIGIO, POLL_OUT); - } } else { if (async->cb_func) async->cb_func(s->async->events, async->cb_arg); |