staging/comedi: Use dev_ printks in drivers/ni_mio_cs.c
authorYAMANE Toshiaki <yamanetoshi@gmail.com>
Thu, 1 Nov 2012 02:39:18 +0000 (11:39 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Nov 2012 15:44:42 +0000 (08:44 -0700)
fixed below checkpatch warnings.
- WARNING: printk() should include KERN_ facility level

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_cs.c

index f8446849b2eb994875b4bc67d8bd501aa327fa99..76c6a13ea9d627ad0e8fbcc5b3f5c576dda5c1d5 100644 (file)
@@ -340,13 +340,15 @@ static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        irq = link->irq;
 
-       printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %u, ",
-              dev->minor, dev->driver->driver_name, dev->iobase, irq);
+       dev->board_ptr = ni_boards + ni_getboardtype(dev, link);
 
 #if 0
        {
                int i;
 
+               printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %u, ",
+                      dev->minor, dev->driver->driver_name, dev->iobase, irq);
+
                printk(" board fingerprint:");
                for (i = 0; i < 32; i += 2) {
                        printk(" %04x %02x", inw(dev->iobase + i),
@@ -357,18 +359,17 @@ static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                for (i = 0; i < 10; i++)
                        printk(" 0x%04x", win_in(i));
                printk("\n");
+
+               printk("boardtype.name: %s\n", boardtype.name);
        }
 #endif
 
-       dev->board_ptr = ni_boards + ni_getboardtype(dev, link);
-
-       printk(" %s", boardtype.name);
        dev->board_name = boardtype.name;
 
        ret = request_irq(irq, ni_E_interrupt, NI_E_IRQ_FLAGS,
                          "ni_mio_cs", dev);
        if (ret < 0) {
-               printk(" irq not available\n");
+               dev_err(dev->class_dev, "irq not available\n");
                return -EINVAL;
        }
        dev->irq = irq;
@@ -401,7 +402,8 @@ static int ni_getboardtype(struct comedi_device *dev,
                        return i;
        }
 
-       printk("unknown board 0x%04x -- pretend it is a ", link->card_id);
+       dev_err(dev->class_dev,
+               "unknown board 0x%04x -- pretend it is a ", link->card_id);
 
        return 0;
 }