Commit bb29ea14 authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Greg Kroah-Hartman

staging/comedi: Use dev_ printks in ni_tiocmd.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_notice(netdev, ... then dev_notice(dev, ... then pr_notice(...  to printk(KERN_NOTICE ...
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32adf1e5
...@@ -173,7 +173,8 @@ static int ni_tio_input_cmd(struct ni_gpct *counter, struct comedi_async *async) ...@@ -173,7 +173,8 @@ static int ni_tio_input_cmd(struct ni_gpct *counter, struct comedi_async *async)
static int ni_tio_output_cmd(struct ni_gpct *counter, static int ni_tio_output_cmd(struct ni_gpct *counter,
struct comedi_async *async) struct comedi_async *async)
{ {
printk(KERN_ERR "ni_tio: output commands not yet implemented.\n"); dev_err(counter->counter_dev->dev->class_dev,
"output commands not yet implemented.\n");
return -ENOTSUPP; return -ENOTSUPP;
counter->mite_chan->dir = COMEDI_OUTPUT; counter->mite_chan->dir = COMEDI_OUTPUT;
...@@ -219,7 +220,10 @@ int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async) ...@@ -219,7 +220,10 @@ int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async)
spin_lock_irqsave(&counter->lock, flags); spin_lock_irqsave(&counter->lock, flags);
if (counter->mite_chan == NULL) { if (counter->mite_chan == NULL) {
printk(KERN_ERR "ni_tio: commands only supported with DMA. Interrupt-driven commands not yet implemented.\n"); dev_err(counter->counter_dev->dev->class_dev,
"commands only supported with DMA. ");
dev_err(counter->counter_dev->dev->class_dev,
"Interrupt-driven commands not yet implemented.\n");
retval = -EIO; retval = -EIO;
} else { } else {
retval = ni_tio_cmd_setup(counter, async); retval = ni_tio_cmd_setup(counter, async);
...@@ -427,8 +431,9 @@ void ni_tio_acknowledge_and_confirm(struct ni_gpct *counter, int *gate_error, ...@@ -427,8 +431,9 @@ void ni_tio_acknowledge_and_confirm(struct ni_gpct *counter, int *gate_error,
NITIO_Gxx_Joint_Status2_Reg NITIO_Gxx_Joint_Status2_Reg
(counter->counter_index)) & (counter->counter_index)) &
Gi_Permanent_Stale_Bit(counter->counter_index)) { Gi_Permanent_Stale_Bit(counter->counter_index)) {
printk(KERN_INFO "%s: Gi_Permanent_Stale_Data detected.\n", dev_info(counter->counter_dev->dev->class_dev,
__func__); "%s: Gi_Permanent_Stale_Data detected.\n",
__func__);
if (perm_stale_data) if (perm_stale_data)
*perm_stale_data = 1; *perm_stale_data = 1;
} }
...@@ -448,7 +453,8 @@ void ni_tio_handle_interrupt(struct ni_gpct *counter, ...@@ -448,7 +453,8 @@ void ni_tio_handle_interrupt(struct ni_gpct *counter,
ni_tio_acknowledge_and_confirm(counter, &gate_error, &tc_error, ni_tio_acknowledge_and_confirm(counter, &gate_error, &tc_error,
&perm_stale_data, NULL); &perm_stale_data, NULL);
if (gate_error) { if (gate_error) {
printk(KERN_NOTICE "%s: Gi_Gate_Error detected.\n", __func__); dev_notice(counter->counter_dev->dev->class_dev,
"%s: Gi_Gate_Error detected.\n", __func__);
s->async->events |= COMEDI_CB_OVERFLOW; s->async->events |= COMEDI_CB_OVERFLOW;
} }
if (perm_stale_data) if (perm_stale_data)
...@@ -459,8 +465,8 @@ void ni_tio_handle_interrupt(struct ni_gpct *counter, ...@@ -459,8 +465,8 @@ void ni_tio_handle_interrupt(struct ni_gpct *counter,
if (read_register(counter, if (read_register(counter,
NITIO_Gi_DMA_Status_Reg NITIO_Gi_DMA_Status_Reg
(counter->counter_index)) & Gi_DRQ_Error_Bit) { (counter->counter_index)) & Gi_DRQ_Error_Bit) {
printk(KERN_NOTICE "%s: Gi_DRQ_Error detected.\n", dev_notice(counter->counter_dev->dev->class_dev,
__func__); "%s: Gi_DRQ_Error detected.\n", __func__);
s->async->events |= COMEDI_CB_OVERFLOW; s->async->events |= COMEDI_CB_OVERFLOW;
} }
break; break;
......
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