Staging: comedi: ii_pci_20kc: fix style printk
authorDirk Hohndel <hohndel@infradead.org>
Wed, 21 Oct 2009 08:05:49 +0000 (01:05 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 20:23:03 +0000 (12:23 -0800)
add KERN_ facility to printk (mostly KERN_INFO, some KERN_WARNING)
I think I found a bug - commented on it but didn't change as it's just
in a printk (off by 1 error in output)

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/ii_pci20kc.c

index 6885714be99371281d8c1c74f91c0516fcc5aec4..e26c1b88ebeb0908b5cf4f0248c32f2788d5cdd4 100644 (file)
@@ -226,14 +226,13 @@ static int pci20xxx_attach(struct comedi_device *dev,
 
        /* Check PCI-20001 C-2A Carrier Board ID */
        if ((readb(devpriv->ioaddr) & PCI20000_ID) != PCI20000_ID) {
-               printk("comedi%d: ii_pci20kc", dev->minor);
-               printk
-                   (" PCI-20001 C-2A Carrier Board at base=0x%p not found !\n",
-                    devpriv->ioaddr);
+               printk(KERN_WARNING "comedi%d: ii_pci20kc PCI-20001"
+                      " C-2A Carrier Board at base=0x%p not found !\n",
+                      dev->minor, devpriv->ioaddr);
                return -EINVAL;
        }
-       printk("comedi%d:\n", dev->minor);
-       printk("ii_pci20kc: PCI-20001 C-2A at base=0x%p\n", devpriv->ioaddr);
+       printk(KERN_INFO "comedi%d: ii_pci20kc: PCI-20001 C-2A at base=0x%p\n",
+              dev->minor, devpriv->ioaddr);
 
        for (i = 0; i < PCI20000_MODULES; i++) {
                s = dev->subdevices + i;
@@ -246,21 +245,23 @@ static int pci20xxx_attach(struct comedi_device *dev,
                            devpriv->ioaddr + (i + 1) * PCI20000_OFFSET;
                        pci20006_init(dev, s, it->options[2 * i + 2],
                                      it->options[2 * i + 3]);
-                       printk("comedi%d: ii_pci20kc", dev->minor);
-                       printk(" PCI-20006 module in slot %d \n", i + 1);
+                       printk(KERN_INFO "comedi%d: "
+                              "ii_pci20kc PCI-20006 module in slot %d \n",
+                              dev->minor, i + 1);
                        break;
                case PCI20341_ID:
                        sdp->pci20341.iobase =
                            devpriv->ioaddr + (i + 1) * PCI20000_OFFSET;
                        pci20341_init(dev, s, it->options[2 * i + 2],
                                      it->options[2 * i + 3]);
-                       printk("comedi%d: ii_pci20kc", dev->minor);
-                       printk(" PCI-20341 module in slot %d \n", i + 1);
+                       printk(KERN_INFO "comedi%d: "
+                              "ii_pci20kc PCI-20341 module in slot %d \n",
+                              dev->minor, i + 1);
                        break;
                default:
-                       printk
-                           ("ii_pci20kc: unknown module code 0x%02x in slot %d: module disabled\n",
-                            id, i);
+                       printk(KERN_WARNING "ii_pci20kc: unknown module "
+                              "code 0x%02x in slot %d: module disabled\n",
+                              id, i); /* XXX this looks like a bug! i + 1 ?? */
                        /* fall through */
                case PCI20xxx_EMPTY_ID:
                        s->type = COMEDI_SUBD_UNUSED;
@@ -276,7 +277,7 @@ static int pci20xxx_attach(struct comedi_device *dev,
 
 static int pci20xxx_detach(struct comedi_device *dev)
 {
-       printk("comedi%d: pci20xxx: remove\n", dev->minor);
+       printk(KERN_INFO "comedi%d: pci20xxx: remove\n", dev->minor);
 
        return 0;
 }
@@ -358,7 +359,8 @@ static int pci20006_insn_write(struct comedi_device *dev,
                writeb(0x00, sdp->iobase + PCI20006_STROBE1);
                break;
        default:
-               printk(" comedi%d: pci20xxx: ao channel Error!\n", dev->minor);
+               printk(KERN_WARNING
+                      " comedi%d: pci20xxx: ao channel Error!\n", dev->minor);
                return -EINVAL;
        }
 
@@ -449,9 +451,10 @@ static int pci20341_insn_read(struct comedi_device *dev,
                        eoc = readb(sdp->iobase + PCI20341_STATUS_REG);
                }
                if (j >= 100) {
-                       printk
-                           ("comedi%d:  pci20xxx: AI interrupt channel %i polling exit !\n",
-                            dev->minor, i);
+                       printk(KERN_WARNING
+                              "comedi%d:  pci20xxx: "
+                              "AI interrupt channel %i polling exit !\n",
+                              dev->minor, i);
                        return -EINVAL;
                }
                lo = readb(sdp->iobase + PCI20341_LDATA);