USB: input: joystick: iforce: fix up dev_err() usages
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 May 2012 22:40:57 +0000 (18:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 May 2012 22:40:57 +0000 (18:40 -0400)
We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/joystick/iforce/iforce-packets.c
drivers/input/joystick/iforce/iforce-usb.c

index 137326a5c2aa2d6655f38c0868a5f3721288bc71..68f5f1e2d73bc86697eb140c961ba1a6067a2b6d 100644 (file)
@@ -257,7 +257,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet)
 
                status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC);
                if (status) {
-                       dev_err(&iforce->usbdev->dev,
+                       dev_err(&iforce->dev->dev,
                                "usb_submit_urb failed %d\n", status);
                        return -1;
                }
index ecbfae7d75392ac8fb2504358a98182ec81b0198..86d3538e104dfcc61cf8d0dd2967374d516efcef 100644 (file)
@@ -100,7 +100,7 @@ static void iforce_usb_irq(struct urb *urb)
 exit:
        status = usb_submit_urb (urb, GFP_ATOMIC);
        if (status)
-               dev_err(&iforce->usbdev->dev,
+               dev_err(&iforce->dev->dev,
                        "%s - usb_submit_urb failed with result %d\n",
                        __func__, status);
 }