Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6705b68d authored by Andrea Gelmini's avatar Andrea Gelmini Committed by Greg Kroah-Hartman
Browse files

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: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 639b9f1e
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644);
int comedi_autoconfig = 1;
int comedi_autoconfig = 1;
module_param(comedi_autoconfig, bool, 0444);
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);
module_param(comedi_num_legacy_minors, int, 0444);


static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static DEFINE_SPINLOCK(comedi_file_info_table_lock);
@@ -2004,12 +2004,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
	if (async->cb_mask & s->async->events) {
	if (async->cb_mask & s->async->events) {
		if (comedi_get_subdevice_runflags(s) & SRF_USER) {
		if (comedi_get_subdevice_runflags(s) & SRF_USER) {
			wake_up_interruptible(&async->wait_head);
			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);
				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);
				kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
			}
		} else {
		} else {
			if (async->cb_func)
			if (async->cb_func)
				async->cb_func(s->async->events, async->cb_arg);
				async->cb_func(s->async->events, async->cb_arg);