aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAndrea Gelmini <andrea.gelmini@gelma.net>2010-02-26 04:14:55 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-04 10:59:01 -0500
commit6705b68d0be284e2f9949f3657ea65d426d0f988 (patch)
treed65b74c226a7545ff1ada7c4d3b40d3b965a675d /drivers/staging
parent639b9f1ee5987270be2bca4bf8b7e6110d3b47ec (diff)
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.c12
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);
63int comedi_autoconfig = 1; 63int comedi_autoconfig = 1;
64module_param(comedi_autoconfig, bool, 0444); 64module_param(comedi_autoconfig, bool, 0444);
65 65
66int comedi_num_legacy_minors = 0; 66int comedi_num_legacy_minors;
67module_param(comedi_num_legacy_minors, int, 0444); 67module_param(comedi_num_legacy_minors, int, 0444);
68 68
69static DEFINE_SPINLOCK(comedi_file_info_table_lock); 69static DEFINE_SPINLOCK(comedi_file_info_table_lock);
@@ -1510,7 +1510,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait)
1510} 1510}
1511 1511
1512static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes, 1512static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes,
1513 loff_t * offset) 1513 loff_t *offset)
1514{ 1514{
1515 struct comedi_subdevice *s; 1515 struct comedi_subdevice *s;
1516 struct comedi_async *async; 1516 struct comedi_async *async;
@@ -1612,7 +1612,7 @@ done:
1612} 1612}
1613 1613
1614static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes, 1614static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes,
1615 loff_t * offset) 1615 loff_t *offset)
1616{ 1616{
1617 struct comedi_subdevice *s; 1617 struct comedi_subdevice *s;
1618 struct comedi_async *async; 1618 struct comedi_async *async;
@@ -2004,12 +2004,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
2004 if (async->cb_mask & s->async->events) { 2004 if (async->cb_mask & s->async->events) {
2005 if (comedi_get_subdevice_runflags(s) & SRF_USER) { 2005 if (comedi_get_subdevice_runflags(s) & SRF_USER) {
2006 wake_up_interruptible(&async->wait_head); 2006 wake_up_interruptible(&async->wait_head);
2007 if (s->subdev_flags & SDF_CMD_READ) { 2007 if (s->subdev_flags & SDF_CMD_READ)
2008 kill_fasync(&dev->async_queue, SIGIO, POLL_IN); 2008 kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
2009 } 2009 if (s->subdev_flags & SDF_CMD_WRITE)
2010 if (s->subdev_flags & SDF_CMD_WRITE) {
2011 kill_fasync(&dev->async_queue, SIGIO, POLL_OUT); 2010 kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
2012 }
2013 } else { 2011 } else {
2014 if (async->cb_func) 2012 if (async->cb_func)
2015 async->cb_func(s->async->events, async->cb_arg); 2013 async->cb_func(s->async->events, async->cb_arg);