staging/comedi: Use dev_ printks in drivers/usbdux.c
authorYAMANE Toshiaki <yamanetoshi@gmail.com>
Mon, 8 Oct 2012 12:25:37 +0000 (21:25 +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_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

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

index b536bba74351178f6ae939f666ab4b7c4781bb78..e89f4e2927b68929a70b99e6b65649e4fd922fed 100644 (file)
@@ -2386,14 +2386,12 @@ static int usbdux_attach_usb(struct comedi_device *dev,
        down(&start_stop_sem);
        this_usbduxsub = usb_get_intfdata(uinterf);
        if (!this_usbduxsub || !this_usbduxsub->probed) {
-               printk(KERN_ERR
-                      "comedi%d: usbdux: error: attach_usb failed, not connected\n",
-                      dev->minor);
+               dev_err(dev->class_dev,
+                       "usbdux: error: attach_usb failed, not connected\n");
                ret = -ENODEV;
        } else if (this_usbduxsub->attached) {
-               printk(KERN_ERR
-                      "comedi%d: usbdux: error: attach_usb failed, already attached\n",
-                      dev->minor);
+               dev_err(dev->class_dev,
+                       "error: attach_usb failed, already attached\n");
                ret = -ENODEV;
        } else
                ret = usbdux_attach_common(dev, this_usbduxsub);