USB: ohci-omap: use dev_err() instead of printk()
authorJingoo Han <jg1.han@samsung.com>
Tue, 10 Dec 2013 12:25:09 +0000 (21:25 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2013 00:32:41 +0000 (16:32 -0800)
Use dev_err() instead of printk() to provide a better message
to userspace.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-omap.c

index a44a4fede1c4c51eb963f52ae8f72c9a291493b2..c923cafcaca76bc5fa7cf918fd3e62e43b7caff9 100644 (file)
@@ -311,14 +311,14 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
        struct usb_hcd *hcd = 0;
 
        if (pdev->num_resources != 2) {
-               printk(KERN_ERR "hcd probe: invalid num_resources: %i\n",
+               dev_err(&pdev->dev, "invalid num_resources: %i\n",
                       pdev->num_resources);
                return -ENODEV;
        }
 
        if (pdev->resource[0].flags != IORESOURCE_MEM
                        || pdev->resource[1].flags != IORESOURCE_IRQ) {
-               printk(KERN_ERR "hcd probe: invalid resource type\n");
+               dev_err(&pdev->dev, "invalid resource type\n");
                return -ENODEV;
        }