Commit fc950139 authored by Ravishankar karkala Mallikarjunayya's avatar Ravishankar karkala Mallikarjunayya Committed by Greg Kroah-Hartman

Staging: comedi: fix brace coding style issue in pcl818.c

This is a patch to the pcl818.c file that fixes up a brace
coding style warning found by the checkpatch.pl tool.
Signed-off-by: default avatarRavishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cc780e8f
...@@ -463,9 +463,8 @@ static int pcl818_ao_insn_read(struct comedi_device *dev, ...@@ -463,9 +463,8 @@ static int pcl818_ao_insn_read(struct comedi_device *dev,
int n; int n;
int chan = CR_CHAN(insn->chanspec); int chan = CR_CHAN(insn->chanspec);
for (n = 0; n < insn->n; n++) { for (n = 0; n < insn->n; n++)
data[n] = devpriv->ao_readback[chan]; data[n] = devpriv->ao_readback[chan];
}
return n; return n;
} }
...@@ -571,9 +570,9 @@ static irqreturn_t interrupt_pcl818_ai_mode13_int(int irq, void *d) ...@@ -571,9 +570,9 @@ static irqreturn_t interrupt_pcl818_ai_mode13_int(int irq, void *d)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
devpriv->act_chanlist_pos++; devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) { if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len)
devpriv->act_chanlist_pos = 0; devpriv->act_chanlist_pos = 0;
}
s->async->cur_chan++; s->async->cur_chan++;
if (s->async->cur_chan >= devpriv->ai_n_chan) { if (s->async->cur_chan >= devpriv->ai_n_chan) {
/* printk("E"); */ /* printk("E"); */
...@@ -645,9 +644,9 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d) ...@@ -645,9 +644,9 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)
comedi_buf_put(s->async, ptr[bufptr++] >> 4); /* get one sample */ comedi_buf_put(s->async, ptr[bufptr++] >> 4); /* get one sample */
devpriv->act_chanlist_pos++; devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) { if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len)
devpriv->act_chanlist_pos = 0; devpriv->act_chanlist_pos = 0;
}
s->async->cur_chan++; s->async->cur_chan++;
if (s->async->cur_chan >= devpriv->ai_n_chan) { if (s->async->cur_chan >= devpriv->ai_n_chan) {
s->async->cur_chan = 0; s->async->cur_chan = 0;
...@@ -805,11 +804,10 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d) ...@@ -805,11 +804,10 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
if (lo & 2) { if (lo & 2)
len = 512; len = 512;
} else { else
len = 0; len = 0;
}
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
lo = inb(dev->iobase + PCL818_FI_DATALO); lo = inb(dev->iobase + PCL818_FI_DATALO);
...@@ -827,9 +825,9 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d) ...@@ -827,9 +825,9 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
comedi_buf_put(s->async, (lo >> 4) | (inb(dev->iobase + PCL818_FI_DATAHI) << 4)); /* get one sample */ comedi_buf_put(s->async, (lo >> 4) | (inb(dev->iobase + PCL818_FI_DATAHI) << 4)); /* get one sample */
devpriv->act_chanlist_pos++; devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) { if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len)
devpriv->act_chanlist_pos = 0; devpriv->act_chanlist_pos = 0;
}
s->async->cur_chan++; s->async->cur_chan++;
if (s->async->cur_chan >= devpriv->ai_n_chan) { if (s->async->cur_chan >= devpriv->ai_n_chan) {
s->async->cur_chan = 0; s->async->cur_chan = 0;
...@@ -1309,11 +1307,9 @@ static void setup_channel_list(struct comedi_device *dev, ...@@ -1309,11 +1307,9 @@ static void setup_channel_list(struct comedi_device *dev,
*/ */
static int check_single_ended(unsigned int port) static int check_single_ended(unsigned int port)
{ {
if (inb(port + PCL818_STATUS) & 0x20) { if (inb(port + PCL818_STATUS) & 0x20)
return 1; return 1;
} else { return 0;
return 0;
}
} }
/* /*
...@@ -1352,9 +1348,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -1352,9 +1348,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
if (!cmd->stop_src || tmp != cmd->stop_src) if (!cmd->stop_src || tmp != cmd->stop_src)
err++; err++;
if (err) { if (err)
return 1; return 1;
}
/* step 2: make sure trigger sources are unique and mutually compatible */ /* step 2: make sure trigger sources are unique and mutually compatible */
...@@ -1377,9 +1372,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -1377,9 +1372,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
if (cmd->stop_src != TRIG_NONE && cmd->stop_src != TRIG_COUNT) if (cmd->stop_src != TRIG_NONE && cmd->stop_src != TRIG_COUNT)
err++; err++;
if (err) { if (err)
return 2; return 2;
}
/* step 3: make sure arguments are trivially compatible */ /* step 3: make sure arguments are trivially compatible */
...@@ -1421,9 +1415,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -1421,9 +1415,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
} }
} }
if (err) { if (err)
return 3; return 3;
}
/* step 4: fix up any arguments */ /* step 4: fix up any arguments */
...@@ -1438,9 +1431,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -1438,9 +1431,8 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
err++; err++;
} }
if (err) { if (err)
return 4; return 4;
}
/* step 5: complain about special chanlist considerations */ /* step 5: complain about special chanlist considerations */
...@@ -1470,11 +1462,10 @@ static int ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1470,11 +1462,10 @@ static int ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
devpriv->ai_timer1 = 0; devpriv->ai_timer1 = 0;
devpriv->ai_timer2 = 0; devpriv->ai_timer2 = 0;
if (cmd->stop_src == TRIG_COUNT) { if (cmd->stop_src == TRIG_COUNT)
devpriv->ai_scans = cmd->stop_arg; devpriv->ai_scans = cmd->stop_arg;
} else { else
devpriv->ai_scans = 0; devpriv->ai_scans = 0;
}
if (cmd->scan_begin_src == TRIG_FOLLOW) { /* mode 1, 3 */ if (cmd->scan_begin_src == TRIG_FOLLOW) { /* mode 1, 3 */
if (cmd->convert_src == TRIG_TIMER) { /* mode 1 */ if (cmd->convert_src == TRIG_TIMER) { /* mode 1 */
...@@ -1633,11 +1624,11 @@ static int set_rtc_irq_bit(unsigned char bit) ...@@ -1633,11 +1624,11 @@ static int set_rtc_irq_bit(unsigned char bit)
save_flags(flags); save_flags(flags);
cli(); cli();
val = CMOS_READ(RTC_CONTROL); val = CMOS_READ(RTC_CONTROL);
if (bit) { if (bit)
val |= RTC_PIE; val |= RTC_PIE;
} else { else
val &= ~RTC_PIE; val &= ~RTC_PIE;
}
CMOS_WRITE(val, RTC_CONTROL); CMOS_WRITE(val, RTC_CONTROL);
CMOS_READ(RTC_INTR_FLAGS); CMOS_READ(RTC_INTR_FLAGS);
restore_flags(flags); restore_flags(flags);
...@@ -1800,12 +1791,11 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1800,12 +1791,11 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
} }
dev->irq = irq; dev->irq = irq;
if (irq) { if (irq)
devpriv->irq_free = 1; devpriv->irq_free = 1; /* 1=we have allocated irq */
} /* 1=we have allocated irq */ else
else {
devpriv->irq_free = 0; devpriv->irq_free = 0;
}
devpriv->irq_blocked = 0; /* number of subdevice which use IRQ */ devpriv->irq_blocked = 0; /* number of subdevice which use IRQ */
devpriv->ai_mode = 0; /* mode of irq */ devpriv->ai_mode = 0; /* mode of irq */
...@@ -2017,11 +2007,10 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -2017,11 +2007,10 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
} }
/* select 1/10MHz oscilator */ /* select 1/10MHz oscilator */
if ((it->options[3] == 0) || (it->options[3] == 10)) { if ((it->options[3] == 0) || (it->options[3] == 10))
devpriv->i8253_osc_base = 100; devpriv->i8253_osc_base = 100;
} else { else
devpriv->i8253_osc_base = 1000; devpriv->i8253_osc_base = 1000;
}
/* max sampling speed */ /* max sampling speed */
devpriv->ns_min = this_board->ns_min; devpriv->ns_min = this_board->ns_min;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment