Commit daca497d authored by John Sheehan's avatar John Sheehan Committed by Greg Kroah-Hartman

Staging: comedi: fix code warnings in s626.c

A patch for s626.c to fix some of the warnings
reported by the checkpatch.pl tool, namely,
printk() should include KERN_ facility level
unnecessary whitespace before a quoted newline
Signed-off-by: default avatarJohn Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6fd071cc
...@@ -543,13 +543,13 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -543,13 +543,13 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->pdev = pdev; devpriv->pdev = pdev;
if (pdev == NULL) { if (pdev == NULL) {
printk("s626_attach: Board not present!!!\n"); printk(KERN_ERR "s626_attach: Board not present!!!\n");
return -ENODEV; return -ENODEV;
} }
result = comedi_pci_enable(pdev, "s626"); result = comedi_pci_enable(pdev, "s626");
if (result < 0) { if (result < 0) {
printk("s626_attach: comedi_pci_enable fails\n"); printk(KERN_ERR "s626_attach: comedi_pci_enable fails\n");
return -ENODEV; return -ENODEV;
} }
devpriv->got_regions = 1; devpriv->got_regions = 1;
...@@ -558,7 +558,7 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -558,7 +558,7 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->base_addr = ioremap(resourceStart, SIZEOF_ADDRESS_SPACE); devpriv->base_addr = ioremap(resourceStart, SIZEOF_ADDRESS_SPACE);
if (devpriv->base_addr == NULL) { if (devpriv->base_addr == NULL) {
printk("s626_attach: IOREMAP failed\n"); printk(KERN_ERR "s626_attach: IOREMAP failed\n");
return -ENODEV; return -ENODEV;
} }
...@@ -579,7 +579,7 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -579,7 +579,7 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it)
pci_alloc_consistent(devpriv->pdev, DMABUF_SIZE, &appdma); pci_alloc_consistent(devpriv->pdev, DMABUF_SIZE, &appdma);
if (devpriv->ANABuf.LogicalBase == NULL) { if (devpriv->ANABuf.LogicalBase == NULL) {
printk("s626_attach: DMA Memory mapping error\n"); printk(KERN_ERR "s626_attach: DMA Memory mapping error\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -596,7 +596,7 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -596,7 +596,7 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it)
pci_alloc_consistent(devpriv->pdev, DMABUF_SIZE, &appdma); pci_alloc_consistent(devpriv->pdev, DMABUF_SIZE, &appdma);
if (devpriv->RPSBuf.LogicalBase == NULL) { if (devpriv->RPSBuf.LogicalBase == NULL) {
printk("s626_attach: DMA Memory mapping error\n"); printk(KERN_ERR "s626_attach: DMA Memory mapping error\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -622,18 +622,18 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -622,18 +622,18 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* set up interrupt handler */ /* set up interrupt handler */
if (dev->irq == 0) { if (dev->irq == 0) {
printk(" unknown irq (bad)\n"); printk(KERN_ERR " unknown irq (bad)\n");
} else { } else {
ret = request_irq(dev->irq, s626_irq_handler, IRQF_SHARED, ret = request_irq(dev->irq, s626_irq_handler, IRQF_SHARED,
"s626", dev); "s626", dev);
if (ret < 0) { if (ret < 0) {
printk(" irq not available\n"); printk(KERN_ERR " irq not available\n");
dev->irq = 0; dev->irq = 0;
} }
} }
DEBUG("s626_attach: -- it opts %d,%d -- \n", DEBUG("s626_attach: -- it opts %d,%d --\n",
it->options[0], it->options[1]); it->options[0], it->options[1]);
s = dev->subdevices + 0; s = dev->subdevices + 0;
...@@ -1513,7 +1513,7 @@ void ResetADC(struct comedi_device *dev, uint8_t * ppl) ...@@ -1513,7 +1513,7 @@ void ResetADC(struct comedi_device *dev, uint8_t * ppl)
break; /* Exit poll list processing loop. */ break; /* Exit poll list processing loop. */
} }
} }
DEBUG("ResetADC: ADC items %d \n", devpriv->AdcItems); DEBUG("ResetADC: ADC items %d\n", devpriv->AdcItems);
/* VERSION 2.01 CHANGE: DELAY CHANGED FROM 250NS to 2US. Allow the /* VERSION 2.01 CHANGE: DELAY CHANGED FROM 250NS to 2US. Allow the
* ADC to stabilize for 2 microseconds before starting the final * ADC to stabilize for 2 microseconds before starting the final
...@@ -1574,7 +1574,7 @@ static int s626_ai_insn_config(struct comedi_device *dev, ...@@ -1574,7 +1574,7 @@ static int s626_ai_insn_config(struct comedi_device *dev,
/* register uint8_t i; */ /* register uint8_t i; */
/* register int32_t *readaddr; */ /* register int32_t *readaddr; */
/* DEBUG("as626_ai_rinsn: ai_rinsn enter \n"); */ /* DEBUG("as626_ai_rinsn: ai_rinsn enter\n"); */
/* Trigger ADC scan loop start by setting RPS Signal 0. */ /* Trigger ADC scan loop start by setting RPS Signal 0. */
/* MC_ENABLE( P_MC2, MC2_ADC_RPS ); */ /* MC_ENABLE( P_MC2, MC2_ADC_RPS ); */
...@@ -1591,11 +1591,11 @@ static int s626_ai_insn_config(struct comedi_device *dev, ...@@ -1591,11 +1591,11 @@ static int s626_ai_insn_config(struct comedi_device *dev,
/* Convert ADC data to 16-bit integer values and copy to application buffer. */ /* Convert ADC data to 16-bit integer values and copy to application buffer. */
/* for ( i = 0; i < devpriv->AdcItems; i++ ) { */ /* for ( i = 0; i < devpriv->AdcItems; i++ ) { */
/* *data = s626_ai_reg_to_uint( *readaddr++ ); */ /* *data = s626_ai_reg_to_uint( *readaddr++ ); */
/* DEBUG("s626_ai_rinsn: data %d \n",*data); */ /* DEBUG("s626_ai_rinsn: data %d\n",*data); */
/* data++; */ /* data++; */
/* } */ /* } */
/* DEBUG("s626_ai_rinsn: ai_rinsn escape \n"); */ /* DEBUG("s626_ai_rinsn: ai_rinsn escape\n"); */
/* return i; */ /* return i; */
/* } */ /* } */
...@@ -1743,7 +1743,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1743,7 +1743,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
DEBUG("s626_ai_cmd: entering command function\n"); DEBUG("s626_ai_cmd: entering command function\n");
if (devpriv->ai_cmd_running) { if (devpriv->ai_cmd_running) {
printk("s626_ai_cmd: Another ai_cmd is running %d\n", printk(KERN_ERR "s626_ai_cmd: Another ai_cmd is running %d\n",
dev->minor); dev->minor);
return -EBUSY; return -EBUSY;
} }
...@@ -2147,7 +2147,7 @@ static void s626_dio_init(struct comedi_device *dev) ...@@ -2147,7 +2147,7 @@ static void s626_dio_init(struct comedi_device *dev)
DEBIwrite(dev, diopriv->WRDOut, 0); /* Program all outputs */ DEBIwrite(dev, diopriv->WRDOut, 0); /* Program all outputs */
/* to inactive state. */ /* to inactive state. */
} }
DEBUG("s626_dio_init: DIO initialized \n"); DEBUG("s626_dio_init: DIO initialized\n");
} }
/* DIO devices are slightly special. Although it is possible to /* DIO devices are slightly special. Although it is possible to
...@@ -2346,7 +2346,7 @@ static int s626_enc_insn_read(struct comedi_device *dev, ...@@ -2346,7 +2346,7 @@ static int s626_enc_insn_read(struct comedi_device *dev,
int n; int n;
struct enc_private *k = &encpriv[CR_CHAN(insn->chanspec)]; struct enc_private *k = &encpriv[CR_CHAN(insn->chanspec)];
DEBUG("s626_enc_insn_read: encoder read channel %d \n", DEBUG("s626_enc_insn_read: encoder read channel %d\n",
CR_CHAN(insn->chanspec)); CR_CHAN(insn->chanspec));
for (n = 0; n < insn->n; n++) for (n = 0; n < insn->n; n++)
...@@ -2364,7 +2364,7 @@ static int s626_enc_insn_write(struct comedi_device *dev, ...@@ -2364,7 +2364,7 @@ static int s626_enc_insn_write(struct comedi_device *dev,
struct enc_private *k = &encpriv[CR_CHAN(insn->chanspec)]; struct enc_private *k = &encpriv[CR_CHAN(insn->chanspec)];
DEBUG("s626_enc_insn_write: encoder write channel %d \n", DEBUG("s626_enc_insn_write: encoder write channel %d\n",
CR_CHAN(insn->chanspec)); CR_CHAN(insn->chanspec));
/* Set the preload register */ /* Set the preload register */
...@@ -3099,12 +3099,12 @@ static uint16_t GetEnable_B(struct comedi_device *dev, struct enc_private *k) ...@@ -3099,12 +3099,12 @@ static uint16_t GetEnable_B(struct comedi_device *dev, struct enc_private *k)
static void SetLatchSource(struct comedi_device *dev, struct enc_private *k, static void SetLatchSource(struct comedi_device *dev, struct enc_private *k,
uint16_t value) uint16_t value)
{ {
DEBUG("SetLatchSource: SetLatchSource enter 3550 \n"); DEBUG("SetLatchSource: SetLatchSource enter 3550\n");
DEBIreplace(dev, k->MyCRB, DEBIreplace(dev, k->MyCRB,
(uint16_t) (~(CRBMSK_INTCTRL | CRBMSK_LATCHSRC)), (uint16_t) (~(CRBMSK_INTCTRL | CRBMSK_LATCHSRC)),
(uint16_t) (value << CRBBIT_LATCHSRC)); (uint16_t) (value << CRBBIT_LATCHSRC));
DEBUG("SetLatchSource: SetLatchSource exit \n"); DEBUG("SetLatchSource: SetLatchSource exit\n");
} }
/* /*
...@@ -3317,6 +3317,6 @@ static void CountersInit(struct comedi_device *dev) ...@@ -3317,6 +3317,6 @@ static void CountersInit(struct comedi_device *dev)
k->ResetCapFlags(dev, k); k->ResetCapFlags(dev, k);
k->SetEnable(dev, k, CLKENAB_ALWAYS); k->SetEnable(dev, k, CLKENAB_ALWAYS);
} }
DEBUG("CountersInit: counters initialized \n"); DEBUG("CountersInit: counters initialized\n");
} }
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