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

Commit 2d238b29 authored by Andrea Gelmini's avatar Andrea Gelmini Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: cb_pcidas.c: Checkpatch cleanup



ERROR: "foo * bar" should be "foo *bar"
+		      uint8_t * data);

WARNING: braces {} are not necessary for single statement blocks
+		if (devpriv->s5933_config) {
+			comedi_pci_disable(devpriv->pci_dev);
+		}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->count = cmd->chanlist_len * cmd->stop_arg;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (cmd->stop_src == TRIG_COUNT) {
+		devpriv->ao_count -= num_points;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (dev->attached == 0) {
+		return IRQ_NONE;
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) {
+		comedi_error(dev, "spurious interrupt");
+	}

WARNING: braces {} are not necessary for single statement blocks
+	if (status & (DAHFI | DAEMI)) {
+		handle_ao_interrupt(dev, status);
+	}

WARNING: braces {} are not necessary for single statement blocks
+		if (async->cmd.stop_src == TRIG_COUNT) {
+			devpriv->ao_count -= num_points;
+		}

ERROR: "foo * bar" should be "foo *bar"
+		      uint8_t * data)

Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 882e1233
Loading
Loading
Loading
Loading
+10 −18
Original line number Diff line number Diff line
@@ -760,9 +760,8 @@ static int cb_pcidas_detach(struct comedi_device *dev)
	if (dev->subdevices)
		subdev_8255_cleanup(dev, dev->subdevices + 2);
	if (devpriv && devpriv->pci_dev) {
		if (devpriv->s5933_config) {
		if (devpriv->s5933_config)
			comedi_pci_disable(devpriv->pci_dev);
		}
		pci_dev_put(devpriv->pci_dev);
	}

@@ -1248,9 +1247,8 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev,
					cmd->flags & TRIG_ROUND_MASK);

	/*  set number of conversions */
	if (cmd->stop_src == TRIG_COUNT) {
	if (cmd->stop_src == TRIG_COUNT)
		devpriv->count = cmd->chanlist_len * cmd->stop_arg;
	}
	/*  enable interrupts */
	spin_lock_irqsave(&dev->spinlock, flags);
	devpriv->adc_fifo_bits |= INTE;
@@ -1449,9 +1447,8 @@ static int cb_pcidas_ao_cmd(struct comedi_device *dev,
			   devpriv->ao_divisor2, 2);
	}
	/*  set number of conversions */
	if (cmd->stop_src == TRIG_COUNT) {
	if (cmd->stop_src == TRIG_COUNT)
		devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
	}
	/*  set pacer source */
	spin_lock_irqsave(&dev->spinlock, flags);
	switch (cmd->scan_begin_src) {
@@ -1494,9 +1491,8 @@ static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
					       num_points * sizeof(short));
	num_points = num_bytes / sizeof(short);

	if (cmd->stop_src == TRIG_COUNT) {
	if (cmd->stop_src == TRIG_COUNT)
		devpriv->ao_count -= num_points;
	}
	/*  write data to board's fifo */
	outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_bytes);

@@ -1534,9 +1530,8 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
	static const int timeout = 10000;
	unsigned long flags;

	if (dev->attached == 0) {
	if (dev->attached == 0)
		return IRQ_NONE;
	}

	async = s->async;
	async->events = 0;
@@ -1558,15 +1553,13 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)

	status = inw(devpriv->control_status + INT_ADCFIFO);
#ifdef CB_PCIDAS_DEBUG
	if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) {
	if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0)
		comedi_error(dev, "spurious interrupt");
	}
#endif

	/*  check for analog output interrupt */
	if (status & (DAHFI | DAEMI)) {
	if (status & (DAHFI | DAEMI))
		handle_ao_interrupt(dev, status);
	}
	/*  check for analog input interrupts */
	/*  if fifo half-full */
	if (status & ADHFI) {
@@ -1675,9 +1668,8 @@ static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status)
					       num_points * sizeof(short));
		num_points = num_bytes / sizeof(short);

		if (async->cmd.stop_src == TRIG_COUNT) {
		if (async->cmd.stop_src == TRIG_COUNT)
			devpriv->ao_count -= num_points;
		}
		/*  write data to board's fifo */
		outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer,
		      num_points);