USB: input: usbtouchscreen.c: fix up dev_err() usage
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 May 2012 00:57:11 +0000 (20:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 May 2012 00:57:11 +0000 (20:57 -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>
CC: Henrik Rydberg <rydberg@euromail.se>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Viresh Kumar <viresh.kumar@st.com>
CC: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/touchscreen/usbtouchscreen.c

index 955441c..4127cf7 100644 (file)
@@ -1380,7 +1380,7 @@ exit:
        usb_mark_last_busy(interface_to_usbdev(usbtouch->interface));
        retval = usb_submit_urb(urb, GFP_ATOMIC);
        if (retval)
-               dev_err(&usbtouch->interface->dev,
+               dev_err(&usbtouch->input->dev,
                        "%s - usb_submit_urb failed with result: %d\n",
                        __func__, retval);
 }
@@ -1623,7 +1623,7 @@ static int usbtouch_probe(struct usb_interface *intf,
                err = usb_submit_urb(usbtouch->irq, GFP_KERNEL);
                if (err) {
                        usb_autopm_put_interface(intf);
-                       dev_err(&intf->dev,
+                       dev_err(&input_dev->dev,
                                "%s - usb_submit_urb failed with result: %d\n",
                                __func__, err);
                        goto out_unregister_input;