parport: Convert printk(KERN_WARN) to dev_warn()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 7 Feb 2018 19:47:55 +0000 (19:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Mar 2018 16:54:09 +0000 (17:54 +0100)
dev_warn() will print device name with associated driver,
no need to keep this open coded.

While here, adjust indentation in the rest of dev_dbg() calls.

Tested-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/parport/parport_serial.c

index c222698410c25071ec6c21b0939430454f9aa199..c56bb06b82d0e21401607136ecd45c93291bbba6 100644 (file)
@@ -571,10 +571,9 @@ static int parport_register(struct pci_dev *dev, const struct pci_device_id *id)
                int irq;
 
                if (priv->num_par == ARRAY_SIZE (priv->port)) {
-                       printk (KERN_WARNING
-                               "parport_serial: %s: only %zu parallel ports "
-                               "supported (%d reported)\n", pci_name (dev),
-                               ARRAY_SIZE(priv->port), card->numports);
+                       dev_warn(&dev->dev,
+                                "only %zu parallel ports supported (%d reported)\n",
+                                ARRAY_SIZE(priv->port), card->numports);
                        break;
                }
 
@@ -590,12 +589,12 @@ static int parport_register(struct pci_dev *dev, const struct pci_device_id *id)
                irq = dev->irq;
                if (irq == IRQ_NONE) {
                        dev_dbg(&dev->dev,
-                       "PCI parallel port detected: I/O at %#lx(%#lx)\n",
+                               "PCI parallel port detected: I/O at %#lx(%#lx)\n",
                                io_lo, io_hi);
                        irq = PARPORT_IRQ_NONE;
                } else {
                        dev_dbg(&dev->dev,
-               "PCI parallel port detected: I/O at %#lx(%#lx), IRQ %d\n",
+                               "PCI parallel port detected: I/O at %#lx(%#lx), IRQ %d\n",
                                io_lo, io_hi, irq);
                }
                port = parport_pc_probe_port (io_lo, io_hi, irq,