mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 04:09:18 -04:00
staging: comedi: drivers/*.c: remove unnecessary blank lines
Blank lines are not needed before a close brace '}' or after an
open brace '{'. Also remove any multiple blank lines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6c7d2c8b52
commit
c8f4b98f47
@@ -354,7 +354,6 @@ static int pci9111_ai_do_cmd_test(struct comedi_device *dev,
|
||||
return 5;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int pci9111_ai_do_cmd(struct comedi_device *dev,
|
||||
|
||||
@@ -633,7 +633,6 @@ static void pci9118_ai_munge(struct comedi_device *dev,
|
||||
array[i] ^= 0x8000;
|
||||
else
|
||||
array[i] = (array[i] >> 4) & 0x0fff;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,6 @@ If you do not specify any options, they will default to
|
||||
|
||||
13-oct-2007
|
||||
+ first try
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
@@ -170,7 +168,6 @@ static int adq12b_di_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
/* only bits 0-4 have information about digital inputs */
|
||||
data[1] = (inb(dev->iobase + ADQ12B_STINR) & ADQ12B_STINR_IN_MASK);
|
||||
|
||||
|
||||
@@ -419,7 +419,6 @@ static int pci_dio_insn_bits_di_b(struct comedi_device *dev,
|
||||
for (i = 0; i < d->regs; i++)
|
||||
data[1] |= inb(dev->iobase + d->addr + i) << (8 * i);
|
||||
|
||||
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,6 @@ static void __exit amplc_pc236_common_exit(void)
|
||||
}
|
||||
module_exit(amplc_pc236_common_exit);
|
||||
|
||||
|
||||
MODULE_AUTHOR("Comedi http://www.comedi.org");
|
||||
MODULE_DESCRIPTION("Comedi helper for amplc_pc236 and amplc_pci236");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -446,7 +446,6 @@ static void pci224_ao_stop(struct comedi_device *dev,
|
||||
if (!test_and_clear_bit(AO_CMD_STARTED, &devpriv->state))
|
||||
return;
|
||||
|
||||
|
||||
spin_lock_irqsave(&devpriv->ao_spinlock, flags);
|
||||
/* Kill the interrupts. */
|
||||
devpriv->intsce = 0;
|
||||
@@ -1029,14 +1028,12 @@ pci224_auto_attach(struct comedi_device *dev, unsigned long context_model)
|
||||
if (!devpriv->ao_scan_vals)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
/* Allocate buffer to hold AO channel scan order. */
|
||||
devpriv->ao_scan_order = kmalloc(sizeof(devpriv->ao_scan_order[0]) *
|
||||
thisboard->ao_chans, GFP_KERNEL);
|
||||
if (!devpriv->ao_scan_order)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
/* Disable interrupt sources. */
|
||||
devpriv->intsce = 0;
|
||||
outb(0, devpriv->iobase1 + PCI224_INT_SCE);
|
||||
|
||||
@@ -30,8 +30,6 @@ Devices: [ComputerBoards] PC-CARD DAS16/16 (cb_das16_cs), PC-CARD DAS16/16-AO
|
||||
Author: ds
|
||||
Updated: Mon, 04 Nov 2002 20:04:21 -0800
|
||||
Status: experimental
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -1475,7 +1475,6 @@ static int alloc_and_init_dma_members(struct comedi_device *dev)
|
||||
&devpriv->ai_buffer_bus_addr[i]);
|
||||
if (!devpriv->ai_buffer[i])
|
||||
return -ENOMEM;
|
||||
|
||||
}
|
||||
for (i = 0; i < AO_DMA_RING_COUNT; i++) {
|
||||
if (ao_cmd_is_supported(thisboard)) {
|
||||
@@ -1485,7 +1484,6 @@ static int alloc_and_init_dma_members(struct comedi_device *dev)
|
||||
ao_buffer_bus_addr[i]);
|
||||
if (!devpriv->ao_buffer[i])
|
||||
return -ENOMEM;
|
||||
|
||||
}
|
||||
}
|
||||
/* allocate dma descriptors */
|
||||
@@ -1838,7 +1836,6 @@ static int ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
}
|
||||
|
||||
for (n = 0; n < insn->n; n++) {
|
||||
|
||||
/* clear adc buffer (inside loop for 4020 sake) */
|
||||
writew(0, devpriv->main_iobase + ADC_BUFFER_CLEAR_REG);
|
||||
|
||||
@@ -1900,7 +1897,6 @@ static int ai_config_block_size(struct comedi_device *dev, unsigned int *data)
|
||||
retval = set_ai_fifo_size(dev, fifo_size);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
||||
}
|
||||
|
||||
block_size = ai_fifo_size(dev) / fifo->num_segments * bytes_in_sample;
|
||||
|
||||
@@ -267,7 +267,6 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
strlcat(devpriv->name, buf,
|
||||
sizeof(devpriv->name));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1141,7 +1141,6 @@ static int das1800_di_rbits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
data[1] = inb(dev->iobase + DAS1800_DIGITAL) & 0xf;
|
||||
data[0] = 0;
|
||||
|
||||
|
||||
@@ -43,8 +43,6 @@ Configuration options:
|
||||
|
||||
The cio-das802/16 does not have a fifo-empty status bit! Therefore
|
||||
only fifo-half-full transfers are possible with this card.
|
||||
*/
|
||||
/*
|
||||
|
||||
cmd triggers supported:
|
||||
start_src: TRIG_NOW | TRIG_EXT
|
||||
@@ -52,8 +50,6 @@ cmd triggers supported:
|
||||
scan_end_src: TRIG_COUNT
|
||||
convert_src: TRIG_TIMER | TRIG_EXT
|
||||
stop_src: TRIG_NONE | TRIG_COUNT
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -397,7 +397,6 @@ static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int dmm32at_ai_cancel(struct comedi_device *dev,
|
||||
|
||||
@@ -126,7 +126,6 @@ static const struct comedi_lrange range_dt2801_ai_pgl_unipolar = {
|
||||
};
|
||||
|
||||
struct dt2801_board {
|
||||
|
||||
const char *name;
|
||||
int boardcode;
|
||||
int ad_diff;
|
||||
|
||||
@@ -194,7 +194,6 @@ static const struct comedi_lrange range_dt2811_pgl_ai_5_bipolar = {
|
||||
#define DT2811_ADMODE 0x03
|
||||
|
||||
struct dt2811_board {
|
||||
|
||||
const char *name;
|
||||
const struct comedi_lrange *bip_5;
|
||||
const struct comedi_lrange *bip_2_5;
|
||||
|
||||
@@ -56,7 +56,6 @@ addition, the clock does not seem to be very accurate.
|
||||
#define DT2814_CHANMASK 0x0f
|
||||
|
||||
struct dt2814_private {
|
||||
|
||||
int ntrig;
|
||||
int curadchan;
|
||||
};
|
||||
@@ -193,7 +192,6 @@ static int dt2814_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
outb(chan | DT2814_ENB | (trigvar << 5), dev->iobase + DT2814_CSR);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static irqreturn_t dt2814_interrupt(int irq, void *d)
|
||||
|
||||
@@ -60,7 +60,6 @@ Configuration options:
|
||||
#define DT2815_STATUS 1
|
||||
|
||||
struct dt2815_private {
|
||||
|
||||
const struct comedi_lrange *range_type_list[8];
|
||||
unsigned int ao_readback[8];
|
||||
};
|
||||
|
||||
@@ -874,7 +874,6 @@ static int dt282x_ao_cmdtest(struct comedi_device *dev,
|
||||
return 4;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int dt282x_ao_inttrig(struct comedi_device *dev,
|
||||
|
||||
@@ -433,7 +433,6 @@ static int gsc_hpdi_cmd_test(struct comedi_device *dev,
|
||||
return 5;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/* setup dma descriptors so a link completes every 'len' bytes */
|
||||
|
||||
@@ -370,7 +370,6 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d)
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
||||
@@ -623,7 +623,6 @@ static int ai_round_cmd_args(struct comedi_device *dev,
|
||||
unsigned int *init_ticks,
|
||||
unsigned int *scan_ticks, unsigned int *chan_ticks)
|
||||
{
|
||||
|
||||
int rest;
|
||||
|
||||
*init_ticks = 0;
|
||||
@@ -730,7 +729,6 @@ static int ai_prepare(struct comedi_device *dev,
|
||||
unsigned int init_ticks,
|
||||
unsigned int scan_ticks, unsigned int chan_ticks)
|
||||
{
|
||||
|
||||
unsigned int tmp = 0;
|
||||
|
||||
/* Write timer arguments */
|
||||
@@ -826,7 +824,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
|
||||
unsigned int init_ticks;
|
||||
unsigned int chan_ticks;
|
||||
unsigned int scan_ticks;
|
||||
@@ -918,7 +915,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
if (cmd->start_src == TRIG_NOW &&
|
||||
cmd->scan_begin_src == TRIG_TIMER &&
|
||||
cmd->convert_src == TRIG_TIMER) {
|
||||
|
||||
/* Check timer arguments */
|
||||
if (init_ticks < ME4000_AI_MIN_TICKS) {
|
||||
dev_err(dev->class_dev, "Invalid start arg\n");
|
||||
@@ -940,7 +936,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
} else if (cmd->start_src == TRIG_NOW &&
|
||||
cmd->scan_begin_src == TRIG_FOLLOW &&
|
||||
cmd->convert_src == TRIG_TIMER) {
|
||||
|
||||
/* Check timer arguments */
|
||||
if (init_ticks < ME4000_AI_MIN_TICKS) {
|
||||
dev_err(dev->class_dev, "Invalid start arg\n");
|
||||
@@ -955,7 +950,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
} else if (cmd->start_src == TRIG_EXT &&
|
||||
cmd->scan_begin_src == TRIG_TIMER &&
|
||||
cmd->convert_src == TRIG_TIMER) {
|
||||
|
||||
/* Check timer arguments */
|
||||
if (init_ticks < ME4000_AI_MIN_TICKS) {
|
||||
dev_err(dev->class_dev, "Invalid start arg\n");
|
||||
@@ -977,7 +971,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
} else if (cmd->start_src == TRIG_EXT &&
|
||||
cmd->scan_begin_src == TRIG_FOLLOW &&
|
||||
cmd->convert_src == TRIG_TIMER) {
|
||||
|
||||
/* Check timer arguments */
|
||||
if (init_ticks < ME4000_AI_MIN_TICKS) {
|
||||
dev_err(dev->class_dev, "Invalid start arg\n");
|
||||
@@ -992,7 +985,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
} else if (cmd->start_src == TRIG_EXT &&
|
||||
cmd->scan_begin_src == TRIG_EXT &&
|
||||
cmd->convert_src == TRIG_TIMER) {
|
||||
|
||||
/* Check timer arguments */
|
||||
if (init_ticks < ME4000_AI_MIN_TICKS) {
|
||||
dev_err(dev->class_dev, "Invalid start arg\n");
|
||||
@@ -1007,7 +999,6 @@ static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
} else if (cmd->start_src == TRIG_EXT &&
|
||||
cmd->scan_begin_src == TRIG_EXT &&
|
||||
cmd->convert_src == TRIG_EXT) {
|
||||
|
||||
/* Check timer arguments */
|
||||
if (init_ticks < ME4000_AI_MIN_TICKS) {
|
||||
dev_err(dev->class_dev, "Invalid start arg\n");
|
||||
|
||||
@@ -237,7 +237,6 @@ static int mf6x4_auto_attach(struct comedi_device *dev, unsigned long context)
|
||||
else
|
||||
devpriv->gpioc_R = devpriv->bar0_mem + MF624_GPIOC_R;
|
||||
|
||||
|
||||
ret = comedi_alloc_subdevices(dev, 4);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -115,7 +115,6 @@ Configuration Options:
|
||||
(MPC624_OSR4 | MPC624_OSR3 | MPC624_OSR2 | MPC624_OSR1 | MPC624_OSR0)
|
||||
/* -------------------------------------------------------------------------- */
|
||||
struct mpc624_private {
|
||||
|
||||
/* set by mpc624_attach() from driver's parameters */
|
||||
unsigned long int ulConvertionRate;
|
||||
};
|
||||
|
||||
@@ -195,7 +195,6 @@ static inline unsigned NI_660X_GPCT_SUBDEV(unsigned index)
|
||||
}
|
||||
|
||||
struct NI_660xRegisterData {
|
||||
|
||||
const char *name; /* Register Name */
|
||||
int offset; /* Offset from base address from GPCT chip */
|
||||
enum ni_660x_register_direction direction;
|
||||
|
||||
@@ -282,7 +282,6 @@ static int ni_getboardtype(struct comedi_device *dev)
|
||||
for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
|
||||
if (ni_boards[i].device_id == device_id)
|
||||
return i;
|
||||
|
||||
}
|
||||
if (device_id == 255)
|
||||
dev_err(dev->class_dev, "can't find board\n");
|
||||
@@ -355,7 +354,6 @@ static int ni_atmio_attach(struct comedi_device *dev,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ Devices: [National Instruments] AT-MIO-16 (atmio16), AT-MIO-16D (atmio16d)
|
||||
#define CLOCK_100_HZ 0x8F25
|
||||
|
||||
struct atmio16_board_t {
|
||||
|
||||
const char *name;
|
||||
int has_8255;
|
||||
};
|
||||
|
||||
@@ -2569,7 +2569,6 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
}
|
||||
|
||||
if (dev->irq) {
|
||||
|
||||
/* interrupt on FIFO, errors, SC_TC */
|
||||
interrupt_a_enable |= AI_Error_Interrupt_Enable |
|
||||
AI_SC_TC_Interrupt_Enable;
|
||||
@@ -3839,7 +3838,6 @@ static int ni_serial_insn_config(struct comedi_device *dev,
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void init_ao_67xx(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
|
||||
@@ -1041,7 +1041,6 @@ static int pcimio_dio_change(struct comedi_device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void m_series_init_eeprom_buffer(struct comedi_device *dev)
|
||||
{
|
||||
struct ni_private *devpriv = dev->private;
|
||||
|
||||
@@ -369,7 +369,6 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev,
|
||||
if (err)
|
||||
return 2;
|
||||
|
||||
|
||||
/* Step 3: check if arguments are trivially valid */
|
||||
|
||||
err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);
|
||||
@@ -390,7 +389,6 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev,
|
||||
if (err)
|
||||
return 3;
|
||||
|
||||
|
||||
/* step 4: fix up any arguments */
|
||||
if (cmd->convert_src == TRIG_TIMER) {
|
||||
unsigned int arg = cmd->convert_arg;
|
||||
@@ -402,7 +400,6 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev,
|
||||
if (err)
|
||||
return 4;
|
||||
|
||||
|
||||
/* step 5: complain about special chanlist considerations */
|
||||
|
||||
if (cmd->chanlist) {
|
||||
|
||||
@@ -315,7 +315,6 @@ static int daqp_ai_insn_read(struct comedi_device *dev,
|
||||
devpriv->interrupt_mode = semaphore;
|
||||
|
||||
for (i = 0; i < insn->n; i++) {
|
||||
|
||||
/* Start conversion */
|
||||
outb(DAQP_COMMAND_ARM | DAQP_COMMAND_FIFO_DATA,
|
||||
dev->iobase + DAQP_COMMAND);
|
||||
|
||||
@@ -839,7 +839,6 @@ static int rtd_ai_cmdtest(struct comedi_device *dev,
|
||||
if (err)
|
||||
return 3;
|
||||
|
||||
|
||||
/* step 4: fix up any arguments */
|
||||
|
||||
if (cmd->scan_begin_src == TRIG_TIMER) {
|
||||
|
||||
@@ -39,14 +39,12 @@ Status: in development
|
||||
#include <linux/poll.h>
|
||||
|
||||
struct serial2002_range_table_t {
|
||||
|
||||
/* HACK... */
|
||||
int length;
|
||||
struct comedi_krange range;
|
||||
};
|
||||
|
||||
struct serial2002_private {
|
||||
|
||||
int port; /* /dev/ttyS<port> */
|
||||
int speed; /* baudrate */
|
||||
struct file *tty;
|
||||
@@ -300,7 +298,6 @@ static struct serial_data serial2002_read(struct file *f, int timeout)
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
static void serial2002_write(struct file *f, struct serial_data data)
|
||||
|
||||
@@ -127,7 +127,6 @@ static int dnp_dio_insn_config(struct comedi_device *dev,
|
||||
outb(val, CSCDR);
|
||||
|
||||
return insn->n;
|
||||
|
||||
}
|
||||
|
||||
static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
|
||||
@@ -38,7 +38,6 @@ Devices: [Fastwel] UNIOxx-5 (unioxx5),
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../comedidev.h"
|
||||
@@ -81,7 +80,6 @@ struct unioxx5_subd_priv {
|
||||
|
||||
static int __unioxx5_define_chan_offset(int chan_num)
|
||||
{
|
||||
|
||||
if (chan_num < 0 || chan_num > 23)
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -1041,7 +1041,6 @@ static int usbdux_dio_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_insn *insn,
|
||||
unsigned int *data)
|
||||
{
|
||||
|
||||
struct usbdux_private *devpriv = dev->private;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -419,7 +419,6 @@ static int usbduxfast_ai_cmdtest(struct comedi_device *dev,
|
||||
/* step 4: fix up any arguments */
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int usbduxfast_ai_inttrig(struct comedi_device *dev,
|
||||
|
||||
Reference in New Issue
Block a user