staging/comedi: Use dev_ printks in drivers/ni_pcimio.c
authorYAMANE Toshiaki <yamanetoshi@gmail.com>
Mon, 8 Oct 2012 12:26:17 +0000 (21:26 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 19:47:57 +0000 (12:47 -0700)
fixed below checkpatch warning.
- WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...

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

index 8723e84826cdfb7308c66b1426dfc71620bd38f3..2e6dbeec9a9cac8ec6284b242d6785811e79813e 100644 (file)
@@ -1384,8 +1384,9 @@ static void m_series_stc_writew(struct comedi_device *dev, uint16_t data,
                /* FIXME: DIO_Output_Register (16 bit reg) is replaced by M_Offset_Static_Digital_Output (32 bit)
                   and M_Offset_SCXI_Serial_Data_Out (8 bit) */
        default:
-               printk(KERN_WARNING "%s: bug! unhandled register=0x%x in switch.\n",
-                      __func__, reg);
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch.\n",
+                        __func__, reg);
                BUG();
                return;
                break;
@@ -1421,8 +1422,9 @@ static uint16_t m_series_stc_readw(struct comedi_device *dev, int reg)
                offset = M_Offset_G01_Status;
                break;
        default:
-               printk(KERN_WARNING "%s: bug! unhandled register=0x%x in switch.\n",
-                      __func__, reg);
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch.\n",
+                        __func__, reg);
                BUG();
                return 0;
                break;
@@ -1465,8 +1467,9 @@ static void m_series_stc_writel(struct comedi_device *dev, uint32_t data,
                offset = M_Offset_G1_Load_B;
                break;
        default:
-               printk(KERN_WARNING "%s: bug! unhandled register=0x%x in switch.\n",
-                      __func__, reg);
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch.\n",
+                        __func__, reg);
                BUG();
                return;
                break;
@@ -1493,8 +1496,9 @@ static uint32_t m_series_stc_readl(struct comedi_device *dev, int reg)
                offset = M_Offset_G1_Save;
                break;
        default:
-               printk(KERN_WARNING "%s: bug! unhandled register=0x%x in switch.\n",
-                      __func__, reg);
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch.\n",
+                        __func__, reg);
                BUG();
                return 0;
                break;