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

staging/comedi: Use dev_ printks in drivers/ii_pci20kc.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 66ae18fa
...@@ -216,13 +216,13 @@ static int pci20xxx_attach(struct comedi_device *dev, ...@@ -216,13 +216,13 @@ static int pci20xxx_attach(struct comedi_device *dev,
/* Check PCI-20001 C-2A Carrier Board ID */ /* Check PCI-20001 C-2A Carrier Board ID */
if ((readb(devpriv->ioaddr) & PCI20000_ID) != PCI20000_ID) { if ((readb(devpriv->ioaddr) & PCI20000_ID) != PCI20000_ID) {
printk(KERN_WARNING "comedi%d: ii_pci20kc PCI-20001" dev_warn(dev->class_dev,
" C-2A Carrier Board at base=0x%p not found !\n", "PCI-20001 C-2A Carrier Board at base=0x%p not found !\n",
dev->minor, devpriv->ioaddr); devpriv->ioaddr);
return -EINVAL; return -EINVAL;
} }
printk(KERN_INFO "comedi%d: ii_pci20kc: PCI-20001 C-2A at base=0x%p\n", dev_info(dev->class_dev, "PCI-20001 C-2A at base=0x%p\n",
dev->minor, devpriv->ioaddr); devpriv->ioaddr);
for (i = 0; i < PCI20000_MODULES; i++) { for (i = 0; i < PCI20000_MODULES; i++) {
s = &dev->subdevices[i]; s = &dev->subdevices[i];
...@@ -235,23 +235,21 @@ static int pci20xxx_attach(struct comedi_device *dev, ...@@ -235,23 +235,21 @@ static int pci20xxx_attach(struct comedi_device *dev,
devpriv->ioaddr + (i + 1) * PCI20000_OFFSET; devpriv->ioaddr + (i + 1) * PCI20000_OFFSET;
pci20006_init(dev, s, it->options[2 * i + 2], pci20006_init(dev, s, it->options[2 * i + 2],
it->options[2 * i + 3]); it->options[2 * i + 3]);
printk(KERN_INFO "comedi%d: " dev_info(dev->class_dev,
"ii_pci20kc PCI-20006 module in slot %d\n", "PCI-20006 module in slot %d\n", i + 1);
dev->minor, i + 1);
break; break;
case PCI20341_ID: case PCI20341_ID:
sdp->pci20341.iobase = sdp->pci20341.iobase =
devpriv->ioaddr + (i + 1) * PCI20000_OFFSET; devpriv->ioaddr + (i + 1) * PCI20000_OFFSET;
pci20341_init(dev, s, it->options[2 * i + 2], pci20341_init(dev, s, it->options[2 * i + 2],
it->options[2 * i + 3]); it->options[2 * i + 3]);
printk(KERN_INFO "comedi%d: " dev_info(dev->class_dev,
"ii_pci20kc PCI-20341 module in slot %d\n", "PCI-20341 module in slot %d\n", i + 1);
dev->minor, i + 1);
break; break;
default: default:
printk(KERN_WARNING "ii_pci20kc: unknown module " dev_warn(dev->class_dev,
"code 0x%02x in slot %d: module disabled\n", "unknown module code 0x%02x in slot %d: module disabled\n",
id, i); /* XXX this looks like a bug! i + 1 ?? */ id, i); /* XXX this looks like a bug! i + 1 ?? */
/* fall through */ /* fall through */
case PCI20xxx_EMPTY_ID: case PCI20xxx_EMPTY_ID:
s->type = COMEDI_SUBD_UNUSED; s->type = COMEDI_SUBD_UNUSED;
...@@ -347,8 +345,7 @@ static int pci20006_insn_write(struct comedi_device *dev, ...@@ -347,8 +345,7 @@ static int pci20006_insn_write(struct comedi_device *dev,
writeb(0x00, sdp->iobase + PCI20006_STROBE1); writeb(0x00, sdp->iobase + PCI20006_STROBE1);
break; break;
default: default:
printk(KERN_WARNING dev_warn(dev->class_dev, "ao channel Error!\n");
" comedi%d: pci20xxx: ao channel Error!\n", dev->minor);
return -EINVAL; return -EINVAL;
} }
...@@ -463,10 +460,8 @@ static int pci20341_insn_read(struct comedi_device *dev, ...@@ -463,10 +460,8 @@ static int pci20341_insn_read(struct comedi_device *dev,
eoc = readb(sdp->iobase + PCI20341_STATUS_REG); eoc = readb(sdp->iobase + PCI20341_STATUS_REG);
} }
if (j >= 100) { if (j >= 100) {
printk(KERN_WARNING dev_warn(dev->class_dev,
"comedi%d: pci20xxx: " "AI interrupt channel %i polling exit !\n", i);
"AI interrupt channel %i polling exit !\n",
dev->minor, i);
return -EINVAL; return -EINVAL;
} }
lo = readb(sdp->iobase + PCI20341_LDATA); lo = readb(sdp->iobase + PCI20341_LDATA);
......
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