staging: comedi: 8255: replace printk calls
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 13 Jun 2012 22:41:15 +0000 (15:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Jun 2012 00:19:07 +0000 (17:19 -0700)
Replace the printk calls with dev_info, dev_warn, etc.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/8255.c

index 502bde8c22c1556abf526c3a7b9f0e115fb3e151..b608a05bcd1b927513a16dc716d9a5fac7f54fda 100644 (file)
@@ -383,8 +383,7 @@ static int dev_8255_attach(struct comedi_device *dev,
                        break;
        }
        if (i == 0) {
-               printk(KERN_WARNING
-                      "comedi%d: 8255: no devices specified\n", dev->minor);
+               dev_warn(dev->class_dev, "no devices specified\n");
                return -EINVAL;
        }
 
@@ -392,24 +391,21 @@ static int dev_8255_attach(struct comedi_device *dev,
        if (ret)
                return ret;
 
-       printk(KERN_INFO "comedi%d: 8255:", dev->minor);
-
        for (i = 0; i < dev->n_subdevices; i++) {
                iobase = it->options[i];
 
-               printk(" 0x%04lx", iobase);
                if (!request_region(iobase, _8255_SIZE, "8255")) {
-                       printk(" (I/O port conflict)");
+                       dev_warn(dev->class_dev,
+                               "0x%04lx (I/O port conflict)\n", iobase);
 
                        dev->subdevices[i].type = COMEDI_SUBD_UNUSED;
                } else {
                        subdev_8255_init(dev, dev->subdevices + i, NULL,
                                         iobase);
+                       dev_info(dev->class_dev, "0x%04lx\n", iobase);
                }
        }
 
-       printk("\n");
-
        return 0;
 }