From 7b22a8855a727c5d8265508cbba05437a68f7043 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:34:49 -0700 Subject: USB: iforce: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. Cc: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/iforce/iforce-main.c | 3 ++- drivers/input/joystick/iforce/iforce-packets.c | 10 +++++++--- drivers/input/joystick/iforce/iforce-usb.c | 5 +++-- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 405febd94f2..daeeb4c7e3b 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -317,7 +317,8 @@ int iforce_init_device(struct iforce *iforce) break; if (i == 20) { /* 5 seconds */ - err("Timeout waiting for response from device."); + dev_err(&input_dev->dev, + "Timeout waiting for response from device.\n"); error = -ENODEV; goto fail; } diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index a17b5001600..137326a5c2a 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -257,7 +257,8 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC); if (status) { - err("usb_submit_urb failed %d", status); + dev_err(&iforce->usbdev->dev, + "usb_submit_urb failed %d\n", status); return -1; } @@ -289,12 +290,15 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) return -1; } #else - err("iforce_get_id_packet: iforce->bus = SERIO!"); + dev_err(&iforce->dev->dev, + "iforce_get_id_packet: iforce->bus = SERIO!\n"); #endif break; default: - err("iforce_get_id_packet: iforce->bus = %d", iforce->bus); + dev_err(&iforce->dev->dev, + "iforce_get_id_packet: iforce->bus = %d\n", + iforce->bus); break; } diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 6c96631ae5d..ecbfae7d753 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -100,8 +100,9 @@ static void iforce_usb_irq(struct urb *urb) exit: status = usb_submit_urb (urb, GFP_ATOMIC); if (status) - err ("%s - usb_submit_urb failed with result %d", - __func__, status); + dev_err(&iforce->usbdev->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, status); } static void iforce_usb_out(struct urb *urb) -- cgit v1.2.2 From 9cb757bfac332cb43122c494597dce80e5424820 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:23 -0700 Subject: USB: xpad.c: remove err() usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov CC: "Magnus Hörlin" CC: Rusty Russell CC: Mauro Carvalho Chehab CC: Chris Moeller Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/xpad.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index fd7a0d5bc94..bee9c00032e 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -492,8 +492,9 @@ static void xpad_irq_in(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err ("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(&xpad->udev->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, retval); } static void xpad_bulk_out(struct urb *urb) @@ -516,6 +517,7 @@ static void xpad_bulk_out(struct urb *urb) #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) static void xpad_irq_out(struct urb *urb) { + struct usb_xpad *xpad = urb->context; int retval, status; status = urb->status; @@ -540,8 +542,9 @@ static void xpad_irq_out(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(&xpad->udev->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, retval); } static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad) -- cgit v1.2.2 From 3f37d8e8e18f4ec7a1bb96ea95910e51e5775d5b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:25 -0700 Subject: USB: cm109.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov CC: Axel Lin Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/cm109.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index ab860511f01..412fe5719cb 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c @@ -327,7 +327,9 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); if (error) - err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error); + dev_err(&dev->intf->dev, + "%s: usb_submit_urb (urb_ctl) failed %d\n", + __func__, error); } /* @@ -349,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb) if (status) { if (status == -ESHUTDOWN) return; - err("%s: urb status %d", __func__, status); + dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); } /* Special keys */ @@ -396,7 +398,8 @@ static void cm109_urb_irq_callback(struct urb *urb) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); if (error) - err("%s: usb_submit_urb (urb_ctl) failed %d", + dev_err(&dev->intf->dev, + "%s: usb_submit_urb (urb_ctl) failed %d\n", __func__, error); } @@ -416,7 +419,7 @@ static void cm109_urb_ctl_callback(struct urb *urb) dev->ctl_data->byte[3]); if (status) - err("%s: urb status %d", __func__, status); + dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); spin_lock(&dev->ctl_submit_lock); @@ -433,7 +436,8 @@ static void cm109_urb_ctl_callback(struct urb *urb) dev->irq_urb_pending = 1; error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); if (error) - err("%s: usb_submit_urb (urb_irq) failed %d", + dev_err(&dev->intf->dev, + "%s: usb_submit_urb (urb_irq) failed %d\n", __func__, error); } } @@ -476,7 +480,8 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on) dev->ctl_data, USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); if (error < 0 && error != -EINTR) - err("%s: usb_control_msg() failed %d", __func__, error); + dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n", + __func__, error); } static void cm109_stop_traffic(struct cm109_dev *dev) @@ -518,8 +523,8 @@ static int cm109_input_open(struct input_dev *idev) error = usb_autopm_get_interface(dev->intf); if (error < 0) { - err("%s - cannot autoresume, result %d", - __func__, error); + dev_err(&idev->dev, "%s - cannot autoresume, result %d\n", + __func__, error); return error; } @@ -537,7 +542,8 @@ static int cm109_input_open(struct input_dev *idev) error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); if (error) - err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error); + dev_err(&idev->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", + __func__, error); else dev->open = 1; @@ -710,7 +716,8 @@ static int cm109_usb_probe(struct usb_interface *intf, pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); if (ret != USB_PKT_LEN) - err("invalid payload size %d, expected %d", ret, USB_PKT_LEN); + dev_err(&intf->dev, "invalid payload size %d, expected %d\n", + ret, USB_PKT_LEN); /* initialise irq urb */ usb_fill_int_urb(dev->urb_irq, udev, pipe, dev->irq_data, -- cgit v1.2.2 From 4efeca581bc84105c2e82d28a3a29e6cd9784204 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:28 -0700 Subject: USB: keyspan_remote.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/keyspan_remote.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index d99151a8bf1..9a45c88bc65 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c @@ -267,7 +267,9 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - err("%s - Unknown sequence found in system data.\n", __func__); + dev_err(&remote->udev->dev, + "%s - Unknown sequence found in system data.\n", + __func__); remote->stage = 0; return; } @@ -286,7 +288,9 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - err("%s - Unknown sequence found in button data.\n", __func__); + dev_err(&remote->udev->dev, + "%s - Unknown sequence found in button data.\n", + __func__); remote->stage = 0; return; } @@ -302,7 +306,9 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - err("%s - Error in message, invalid toggle.\n", __func__); + dev_err(&remote->udev->dev, + "%s - Error in message, invalid toggle.\n", + __func__); remote->stage = 0; return; } @@ -312,7 +318,8 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 5; remote->data.bits_left -= 5; } else { - err("Bad message received, no stop bit found.\n"); + dev_err(&remote->udev->dev, + "Bad message received, no stop bit found.\n"); } dev_dbg(&remote->udev->dev, @@ -397,7 +404,9 @@ static void keyspan_irq_recv(struct urb *urb) resubmit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err ("%s - usb_submit_urb failed with result: %d", __func__, retval); + dev_err(&dev->udev->dev, + "%s - usb_submit_urb failed with result: %d\n", + __func__, retval); } static int keyspan_open(struct input_dev *dev) -- cgit v1.2.2 From 2385f3c3c757b6ffb766c320df4a7f7a45593f24 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:30 -0700 Subject: USB: powermate.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/powermate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 538f7049ec6..71ec621fbef 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c @@ -110,8 +110,9 @@ static void powermate_irq(struct urb *urb) exit: retval = usb_submit_urb (urb, GFP_ATOMIC); if (retval) - err ("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(&pm->udev->dev, + "%s - usb_submit_urb failed with result: %d\n", + __func__, retval); } /* Decide if we need to issue a control message and do so. Must be called with pm->lock taken */ -- cgit v1.2.2 From 08813d35d2ac6f304a53eb3a9ee59283fa7cc67f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:31 -0700 Subject: USB: yealink.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Henk Vergonet CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/yealink.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index f4776e7f8c1..4984823b368 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c @@ -428,7 +428,8 @@ static void urb_irq_callback(struct urb *urb) int ret, status = urb->status; if (status) - err("%s - urb status %d", __func__, status); + dev_err(&yld->udev->dev, "%s - urb status %d\n", + __func__, status); switch (yld->irq_data->cmd) { case CMD_KEYPRESS: @@ -443,7 +444,8 @@ static void urb_irq_callback(struct urb *urb) break; default: - err("unexpected response %x", yld->irq_data->cmd); + dev_err(&yld->udev->dev, "unexpected response %x\n", + yld->irq_data->cmd); } yealink_do_idle_tasks(yld); @@ -451,7 +453,9 @@ static void urb_irq_callback(struct urb *urb) if (!yld->shutdown) { ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC); if (ret && ret != -EPERM) - err("%s - usb_submit_urb failed %d", __func__, ret); + dev_err(&yld->udev->dev, + "%s - usb_submit_urb failed %d\n", + __func__, ret); } } @@ -461,7 +465,8 @@ static void urb_ctl_callback(struct urb *urb) int ret = 0, status = urb->status; if (status) - err("%s - urb status %d", __func__, status); + dev_err(&yld->udev->dev, "%s - urb status %d\n", + __func__, status); switch (yld->ctl_data->cmd) { case CMD_KEYPRESS: @@ -479,7 +484,8 @@ static void urb_ctl_callback(struct urb *urb) } if (ret && ret != -EPERM) - err("%s - usb_submit_urb failed %d", __func__, ret); + dev_err(&yld->udev->dev, "%s - usb_submit_urb failed %d\n", + __func__, ret); } /******************************************************************************* @@ -909,7 +915,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); if (ret != USB_PKT_LEN) - err("invalid payload size %d, expected %zd", ret, USB_PKT_LEN); + dev_err(&intf->dev, "invalid payload size %d, expected %zd\n", + ret, USB_PKT_LEN); /* initialise irq urb */ usb_fill_int_urb(yld->urb_irq, udev, pipe, yld->irq_data, -- cgit v1.2.2 From 9c113dc67ab712e1bb82e974e51c49a678562713 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:31 -0700 Subject: USB: appletouch.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Alessandro Rubini CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/appletouch.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 0acbc7d50d0..90db679b44a 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -262,7 +262,7 @@ static int atp_geyser_init(struct usb_device *udev) data = kmalloc(8, GFP_KERNEL); if (!data) { - err("Out of memory"); + dev_err(&udev->dev, "Out of memory\n"); return -ENOMEM; } @@ -277,7 +277,7 @@ static int atp_geyser_init(struct usb_device *udev) for (i = 0; i < 8; i++) dprintk("appletouch[%d]: %d\n", i, data[i]); - err("Failed to read mode from device."); + dev_err(&udev->dev, "Failed to read mode from device.\n"); ret = -EIO; goto out_free; } @@ -296,7 +296,7 @@ static int atp_geyser_init(struct usb_device *udev) for (i = 0; i < 8; i++) dprintk("appletouch[%d]: %d\n", i, data[i]); - err("Failed to request geyser raw mode"); + dev_err(&udev->dev, "Failed to request geyser raw mode\n"); ret = -EIO; goto out_free; } @@ -321,8 +321,9 @@ static void atp_reinit(struct work_struct *work) retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - err("atp_reinit: usb_submit_urb failed with error %d", - retval); + dev_err(&udev->dev, + "atp_reinit: usb_submit_urb failed with error %d\n", + retval); } static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, @@ -588,8 +589,9 @@ static void atp_complete_geyser_1_2(struct urb *urb) exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - err("atp_complete: usb_submit_urb failed with result %d", - retval); + dev_err(&dev->udev->dev, + "atp_complete: usb_submit_urb failed with result %d\n", + retval); } /* Interrupt function for older touchpads: GEYSER3/GEYSER4 */ @@ -722,8 +724,9 @@ static void atp_complete_geyser_3_4(struct urb *urb) exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - err("atp_complete: usb_submit_urb failed with result %d", - retval); + dev_err(&dev->udev->dev, + "atp_complete: usb_submit_urb failed with result %d\n", + retval); } static int atp_open(struct input_dev *input) @@ -785,7 +788,7 @@ static int atp_probe(struct usb_interface *iface, } } if (!int_in_endpointAddr) { - err("Could not find int-in endpoint"); + dev_err(&iface->dev, "Could not find int-in endpoint\n"); return -EIO; } @@ -793,7 +796,7 @@ static int atp_probe(struct usb_interface *iface, dev = kzalloc(sizeof(struct atp), GFP_KERNEL); input_dev = input_allocate_device(); if (!dev || !input_dev) { - err("Out of memory"); + dev_err(&iface->dev, "Out of memory\n"); goto err_free_devs; } -- cgit v1.2.2 From 6c1d1b246199c75486f5ffa677cf0e411ce4ac6e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:31 -0700 Subject: USB: bcm5974.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Henrik Rydberg CC: Alessandro Rubini CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/bcm5974.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index f9e2758b9f4..8cd7c932c20 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) int retval = 0, size; if (!data) { - err("bcm5974: out of memory"); + dev_err(&dev->intf->dev, "out of memory\n"); retval = -ENOMEM; goto out; } @@ -597,7 +597,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); if (size != 8) { - err("bcm5974: could not read from device"); + dev_err(&dev->intf->dev, "could not read from device\n"); retval = -EIO; goto out; } @@ -615,7 +615,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); if (size != 8) { - err("bcm5974: could not write to device"); + dev_err(&dev->intf->dev, "could not write to device\n"); retval = -EIO; goto out; } @@ -654,7 +654,7 @@ static void bcm5974_irq_button(struct urb *urb) exit: error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); if (error) - err("bcm5974: button urb failed: %d", error); + dev_err(&dev->intf->dev, "button urb failed: %d\n", error); } static void bcm5974_irq_trackpad(struct urb *urb) @@ -687,7 +687,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) exit: error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); if (error) - err("bcm5974: trackpad urb failed: %d", error); + dev_err(&dev->intf->dev, "trackpad urb failed: %d\n", error); } /* @@ -833,7 +833,7 @@ static int bcm5974_probe(struct usb_interface *iface, dev = kzalloc(sizeof(struct bcm5974), GFP_KERNEL); input_dev = input_allocate_device(); if (!dev || !input_dev) { - err("bcm5974: out of memory"); + dev_err(&iface->dev, "out of memory\n"); goto err_free_devs; } -- cgit v1.2.2 From b59c82bd6f9d60dd09dd2c696fb1894802ae3e33 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:34 -0700 Subject: USB: acecad.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/acecad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index f8b0b1df913..da6c3410619 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -105,8 +105,10 @@ static void usb_acecad_irq(struct urb *urb) resubmit: status = usb_submit_urb(urb, GFP_ATOMIC); if (status) - err("can't resubmit intr, %s-%s/input0, status %d", - acecad->usbdev->bus->bus_name, acecad->usbdev->devpath, status); + dev_err(&acecad->usbdev->dev, + "can't resubmit intr, %s-%s/input0, status %d\n", + acecad->usbdev->bus->bus_name, + acecad->usbdev->devpath, status); } static int usb_acecad_open(struct input_dev *dev) -- cgit v1.2.2 From 1f80bb943d755d48b894c677097fd80c7d7cce16 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:36 -0700 Subject: USB: aiptek.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov CC: Jesper Juhl CC: JJ Ding CC: Edwin van Vliet Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/aiptek.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 205d16aab44..b8d43eb3c8f 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c @@ -811,8 +811,9 @@ static void aiptek_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval != 0) { - err("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(&aiptek->usbdev->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, retval); } } -- cgit v1.2.2 From 3bd9597a6b8d5111c698a38761c4e2883cdcf8c9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:39 -0700 Subject: USB: gtco.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/gtco.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index 89a297801dc..fed555bf9ff 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -2,8 +2,6 @@ GTCO digitizer USB driver -Use the err() and dbg() macros from usb.h for system logging - TO CHECK: Is pressure done right on report 5? Copyright (C) 2006 GTCO CalComp @@ -808,7 +806,8 @@ static void gtco_urb_callback(struct urb *urbinfo) resubmit: rc = usb_submit_urb(urbinfo, GFP_ATOMIC); if (rc != 0) - err("usb_submit_urb failed rc=0x%x", rc); + dev_err(&device->usbdev->dev, + "usb_submit_urb failed rc=0x%x\n", rc); } /* @@ -838,7 +837,7 @@ static int gtco_probe(struct usb_interface *usbinterface, gtco = kzalloc(sizeof(struct gtco), GFP_KERNEL); input_dev = input_allocate_device(); if (!gtco || !input_dev) { - err("No more memory"); + dev_err(&usbinterface->dev, "No more memory\n"); error = -ENOMEM; goto err_free_devs; } @@ -853,7 +852,7 @@ static int gtco_probe(struct usb_interface *usbinterface, gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE, GFP_KERNEL, >co->buf_dma); if (!gtco->buffer) { - err("No more memory for us buffers"); + dev_err(&usbinterface->dev, "No more memory for us buffers\n"); error = -ENOMEM; goto err_free_devs; } @@ -861,7 +860,7 @@ static int gtco_probe(struct usb_interface *usbinterface, /* Allocate URB for reports */ gtco->urbinfo = usb_alloc_urb(0, GFP_KERNEL); if (!gtco->urbinfo) { - err("Failed to allocate URB"); + dev_err(&usbinterface->dev, "Failed to allocate URB\n"); error = -ENOMEM; goto err_free_buf; } @@ -888,7 +887,8 @@ static int gtco_probe(struct usb_interface *usbinterface, */ if (usb_get_extra_descriptor(usbinterface->cur_altsetting, HID_DEVICE_TYPE, &hid_desc) != 0){ - err("Can't retrieve exta USB descriptor to get hid report descriptor length"); + dev_err(&usbinterface->dev, + "Can't retrieve exta USB descriptor to get hid report descriptor length\n"); error = -EIO; goto err_free_urb; } @@ -898,7 +898,7 @@ static int gtco_probe(struct usb_interface *usbinterface, report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL); if (!report) { - err("No more memory for report"); + dev_err(&usbinterface->dev, "No more memory for report\n"); error = -ENOMEM; goto err_free_urb; } @@ -926,8 +926,9 @@ static int gtco_probe(struct usb_interface *usbinterface, /* If we didn't get the report, fail */ if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { - err("Failed to get HID Report Descriptor of size: %d", - hid_desc->wDescriptorLength); + dev_err(&usbinterface->dev, + "Failed to get HID Report Descriptor of size: %d\n", + hid_desc->wDescriptorLength); error = -EIO; goto err_free_urb; } -- cgit v1.2.2 From 202712c2322a1b87f3359046f5ebe92e0384ff6d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:41 -0700 Subject: USB: kbtab.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/kbtab.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index 85a5b40333a..1eb6341f81c 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c @@ -80,8 +80,9 @@ static void kbtab_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(&kbtab->usbdev->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, retval); } static struct usb_device_id kbtab_ids[] = { -- cgit v1.2.2 From b3169fecb10594ac1182de904d367631a4dbdf1c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:44 -0700 Subject: USB: wacom_sys.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov CC: Ping Cheng CC: Chris Bagwell CC: Eduard Hasenleithner CC: Jason Gerecke Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/wacom_sys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 0d269212931..3db4684a0b7 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -122,8 +122,9 @@ static void wacom_sys_irq(struct urb *urb) usb_mark_last_busy(wacom->usbdev); retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err ("%s - usb_submit_urb failed with result %d", - __func__, retval); + dev_err(&wacom->intf->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, retval); } static int wacom_open(struct input_dev *dev) -- cgit v1.2.2 From e27ad0fe9cca5e6c98c3af6d7021690b6960adf8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 14:48:46 -0700 Subject: USB: usbtouchscreen.c: remove err() usage err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov CC: Henrik Rydberg CC: Rusty Russell CC: Viresh Kumar CC: Armando Visconti Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/usbtouchscreen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 22cd96f58c9..955441cb030 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -1380,8 +1380,9 @@ exit: usb_mark_last_busy(interface_to_usbdev(usbtouch->interface)); retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - err("%s - usb_submit_urb failed with result: %d", - __func__, retval); + dev_err(&usbtouch->interface->dev, + "%s - usb_submit_urb failed with result: %d\n", + __func__, retval); } static int usbtouch_open(struct input_dev *input) @@ -1622,8 +1623,9 @@ static int usbtouch_probe(struct usb_interface *intf, err = usb_submit_urb(usbtouch->irq, GFP_KERNEL); if (err) { usb_autopm_put_interface(intf); - err("%s - usb_submit_urb failed with result: %d", - __func__, err); + dev_err(&intf->dev, + "%s - usb_submit_urb failed with result: %d\n", + __func__, err); goto out_unregister_input; } } -- cgit v1.2.2 From d331efdd993f4c392f5f63f970b3a55996e3a959 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 18:40:57 -0400 Subject: USB: input: joystick: iforce: fix up dev_err() usages 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 Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/iforce/iforce-packets.c | 2 +- drivers/input/joystick/iforce/iforce-usb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 137326a5c2a..68f5f1e2d73 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -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; } diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index ecbfae7d753..86d3538e104 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -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); } -- cgit v1.2.2 From 39e85a2673c0c9696939dbe10e79c2fb4b91b91c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:34 -0400 Subject: USB: input: xpad.c: fix up dev_err() usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 CC: "Magnus Hörlin" CC: Rusty Russell CC: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/xpad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index bee9c00032e..d760031430a 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -492,7 +492,7 @@ static void xpad_irq_in(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&xpad->udev->dev, + dev_err(&xpad->dev->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } @@ -542,7 +542,7 @@ static void xpad_irq_out(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&xpad->udev->dev, + dev_err(&xpad->dev->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } -- cgit v1.2.2 From 388fd2026633acf2a23fcb7918ba24d9d646bcfb Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:38 -0400 Subject: USB: input: cm109.c: fix up dev_err() usage 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 CC: Axel Lin Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/cm109.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index 412fe5719cb..9e76ab18e94 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c @@ -327,7 +327,7 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); if (error) - dev_err(&dev->intf->dev, + dev_err(&dev->idev->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", __func__, error); } @@ -351,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb) if (status) { if (status == -ESHUTDOWN) return; - dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); + dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status); } /* Special keys */ @@ -398,7 +398,7 @@ static void cm109_urb_irq_callback(struct urb *urb) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); if (error) - dev_err(&dev->intf->dev, + dev_err(&dev->idev->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", __func__, error); } @@ -419,7 +419,7 @@ static void cm109_urb_ctl_callback(struct urb *urb) dev->ctl_data->byte[3]); if (status) - dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); + dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status); spin_lock(&dev->ctl_submit_lock); @@ -436,7 +436,7 @@ static void cm109_urb_ctl_callback(struct urb *urb) dev->irq_urb_pending = 1; error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); if (error) - dev_err(&dev->intf->dev, + dev_err(&dev->idev->dev, "%s: usb_submit_urb (urb_irq) failed %d\n", __func__, error); } @@ -480,7 +480,7 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on) dev->ctl_data, USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); if (error < 0 && error != -EINTR) - dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n", + dev_err(&dev->idev->dev, "%s: usb_control_msg() failed %d\n", __func__, error); } -- cgit v1.2.2 From 3b449fe5d5585a43f26bda4c3d86b7677d4c80db Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:41 -0400 Subject: USB: input: keyspan_remote.c: fix up dev_err() usage 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 Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/keyspan_remote.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index 9a45c88bc65..7f017d497d8 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c @@ -267,7 +267,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - dev_err(&remote->udev->dev, + dev_err(&remote->input->dev, "%s - Unknown sequence found in system data.\n", __func__); remote->stage = 0; @@ -288,7 +288,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - dev_err(&remote->udev->dev, + dev_err(&remote->input->dev, "%s - Unknown sequence found in button data.\n", __func__); remote->stage = 0; @@ -306,7 +306,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - dev_err(&remote->udev->dev, + dev_err(&remote->input->dev, "%s - Error in message, invalid toggle.\n", __func__); remote->stage = 0; @@ -318,7 +318,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 5; remote->data.bits_left -= 5; } else { - dev_err(&remote->udev->dev, + dev_err(&remote->input->dev, "Bad message received, no stop bit found.\n"); } @@ -404,7 +404,7 @@ static void keyspan_irq_recv(struct urb *urb) resubmit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&dev->udev->dev, + dev_err(&dev->input->dev, "%s - usb_submit_urb failed with result: %d\n", __func__, retval); } -- cgit v1.2.2 From 6b37dbba5d5f4e167eb5ca57e43c1bd49a696831 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:45 -0400 Subject: USB: input: powermate.c: fix up dev_err() usage 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 Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/powermate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 71ec621fbef..3091b82b1f9 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c @@ -110,7 +110,7 @@ static void powermate_irq(struct urb *urb) exit: retval = usb_submit_urb (urb, GFP_ATOMIC); if (retval) - dev_err(&pm->udev->dev, + dev_err(&pm->input->dev, "%s - usb_submit_urb failed with result: %d\n", __func__, retval); } -- cgit v1.2.2 From aa330384a6444682126de5dd49982fa428badd08 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:46 -0400 Subject: USB: input: yealink.c: fix up dev_err() usage 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 CC: Henk Vergonet Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/yealink.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 4984823b368..9f71bb174ee 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c @@ -428,7 +428,7 @@ static void urb_irq_callback(struct urb *urb) int ret, status = urb->status; if (status) - dev_err(&yld->udev->dev, "%s - urb status %d\n", + dev_err(&yld->idev->dev, "%s - urb status %d\n", __func__, status); switch (yld->irq_data->cmd) { @@ -444,7 +444,7 @@ static void urb_irq_callback(struct urb *urb) break; default: - dev_err(&yld->udev->dev, "unexpected response %x\n", + dev_err(&yld->idev->dev, "unexpected response %x\n", yld->irq_data->cmd); } @@ -453,7 +453,7 @@ static void urb_irq_callback(struct urb *urb) if (!yld->shutdown) { ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC); if (ret && ret != -EPERM) - dev_err(&yld->udev->dev, + dev_err(&yld->idev->dev, "%s - usb_submit_urb failed %d\n", __func__, ret); } @@ -465,7 +465,7 @@ static void urb_ctl_callback(struct urb *urb) int ret = 0, status = urb->status; if (status) - dev_err(&yld->udev->dev, "%s - urb status %d\n", + dev_err(&yld->idev->dev, "%s - urb status %d\n", __func__, status); switch (yld->ctl_data->cmd) { @@ -484,7 +484,7 @@ static void urb_ctl_callback(struct urb *urb) } if (ret && ret != -EPERM) - dev_err(&yld->udev->dev, "%s - usb_submit_urb failed %d\n", + dev_err(&yld->idev->dev, "%s - usb_submit_urb failed %d\n", __func__, ret); } -- cgit v1.2.2 From 80f8594f63dd35179235aa22901dfa5ce786fe00 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:47 -0400 Subject: USB: input: appletouch.c: fix up dev_err() usage 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 CC: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/appletouch.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 90db679b44a..a5f15477a7e 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -253,8 +253,9 @@ MODULE_PARM_DESC(debug, "Activate debugging output"); * packets (Report ID 2). This code changes device mode, so it * sends raw sensor reports (Report ID 5). */ -static int atp_geyser_init(struct usb_device *udev) +static int atp_geyser_init(struct atp *dev) { + struct usb_device *udev = dev->udev; char *data; int size; int i; @@ -262,7 +263,7 @@ static int atp_geyser_init(struct usb_device *udev) data = kmalloc(8, GFP_KERNEL); if (!data) { - dev_err(&udev->dev, "Out of memory\n"); + dev_err(&dev->input->dev, "Out of memory\n"); return -ENOMEM; } @@ -277,7 +278,7 @@ static int atp_geyser_init(struct usb_device *udev) for (i = 0; i < 8; i++) dprintk("appletouch[%d]: %d\n", i, data[i]); - dev_err(&udev->dev, "Failed to read mode from device.\n"); + dev_err(&dev->input->dev, "Failed to read mode from device.\n"); ret = -EIO; goto out_free; } @@ -296,7 +297,7 @@ static int atp_geyser_init(struct usb_device *udev) for (i = 0; i < 8; i++) dprintk("appletouch[%d]: %d\n", i, data[i]); - dev_err(&udev->dev, "Failed to request geyser raw mode\n"); + dev_err(&dev->input->dev, "Failed to request geyser raw mode\n"); ret = -EIO; goto out_free; } @@ -313,15 +314,14 @@ out_free: static void atp_reinit(struct work_struct *work) { struct atp *dev = container_of(work, struct atp, work); - struct usb_device *udev = dev->udev; int retval; dprintk("appletouch: putting appletouch to sleep (reinit)\n"); - atp_geyser_init(udev); + atp_geyser_init(dev); retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - dev_err(&udev->dev, + dev_err(&dev->input->dev, "atp_reinit: usb_submit_urb failed with error %d\n", retval); } @@ -589,7 +589,7 @@ static void atp_complete_geyser_1_2(struct urb *urb) exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - dev_err(&dev->udev->dev, + dev_err(&dev->input->dev, "atp_complete: usb_submit_urb failed with result %d\n", retval); } @@ -724,7 +724,7 @@ static void atp_complete_geyser_3_4(struct urb *urb) exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - dev_err(&dev->udev->dev, + dev_err(&dev->input->dev, "atp_complete: usb_submit_urb failed with result %d\n", retval); } @@ -751,14 +751,12 @@ static void atp_close(struct input_dev *input) static int atp_handle_geyser(struct atp *dev) { - struct usb_device *udev = dev->udev; - if (dev->info != &fountain_info) { /* switch to raw sensor mode */ - if (atp_geyser_init(udev)) + if (atp_geyser_init(dev)) return -EIO; - printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); + dev_info(&dev->input->dev, "Geyser mode initialized.\n"); } return 0; -- cgit v1.2.2 From 140b1230a19b65489317271da36465e42865f2e4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:47 -0400 Subject: USB: input: bcm5974.c: fix up dev_err() usage 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 CC: Henrik Rydberg CC: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/bcm5974.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index 8cd7c932c20..e2e8d815da7 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) int retval = 0, size; if (!data) { - dev_err(&dev->intf->dev, "out of memory\n"); + dev_err(&dev->input->dev, "out of memory\n"); retval = -ENOMEM; goto out; } @@ -597,7 +597,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); if (size != 8) { - dev_err(&dev->intf->dev, "could not read from device\n"); + dev_err(&dev->input->dev, "could not read from device\n"); retval = -EIO; goto out; } @@ -615,7 +615,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); if (size != 8) { - dev_err(&dev->intf->dev, "could not write to device\n"); + dev_err(&dev->input->dev, "could not write to device\n"); retval = -EIO; goto out; } @@ -654,7 +654,7 @@ static void bcm5974_irq_button(struct urb *urb) exit: error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); if (error) - dev_err(&dev->intf->dev, "button urb failed: %d\n", error); + dev_err(&dev->input->dev, "button urb failed: %d\n", error); } static void bcm5974_irq_trackpad(struct urb *urb) @@ -687,7 +687,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) exit: error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); if (error) - dev_err(&dev->intf->dev, "trackpad urb failed: %d\n", error); + dev_err(&dev->input->dev, "trackpad urb failed: %d\n", error); } /* -- cgit v1.2.2 From b30662c4721ea77ca5930dd60f3294cd1413067f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:51 -0400 Subject: USB: input: acecad.c: fix up dev_err() usage 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 Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/acecad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index da6c3410619..a81a2b06028 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -105,7 +105,7 @@ static void usb_acecad_irq(struct urb *urb) resubmit: status = usb_submit_urb(urb, GFP_ATOMIC); if (status) - dev_err(&acecad->usbdev->dev, + dev_err(&dev->dev, "can't resubmit intr, %s-%s/input0, status %d\n", acecad->usbdev->bus->bus_name, acecad->usbdev->devpath, status); -- cgit v1.2.2 From 383c52f3388b5ddb2fbf1ec073081bc9c4bdfeff Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:56:56 -0400 Subject: USB: input: aiptek.c: fix up dev_err() usage 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 CC: Jesper Juhl CC: JJ Ding CC: Edwin van Vliet Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/aiptek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index b8d43eb3c8f..dc16bfd2473 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c @@ -811,7 +811,7 @@ static void aiptek_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval != 0) { - dev_err(&aiptek->usbdev->dev, + dev_err(&inputdev->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } -- cgit v1.2.2 From 88d5ab3a1817bcfe192ae79ef85ef3fb3e8c6669 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:57:00 -0400 Subject: USB: input: gtco.c: fix up dev_err() usage 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 Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/gtco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index fed555bf9ff..937215373e9 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -806,7 +806,7 @@ static void gtco_urb_callback(struct urb *urbinfo) resubmit: rc = usb_submit_urb(urbinfo, GFP_ATOMIC); if (rc != 0) - dev_err(&device->usbdev->dev, + dev_err(&inputdev->dev, "usb_submit_urb failed rc=0x%x\n", rc); } -- cgit v1.2.2 From 3415b57cb3d7b6b6cd5fcbf5f3f64ca28a3f95e2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:57:03 -0400 Subject: USB: input: kbtab.c: fix up dev_err() usage 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 Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/kbtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index 1eb6341f81c..be717d758cb 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c @@ -80,7 +80,7 @@ static void kbtab_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&kbtab->usbdev->dev, + dev_err(&dev->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } -- cgit v1.2.2 From 1b5ca928e7d09c5ce0cefe6aec7392e4a3aa1d3b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:57:07 -0400 Subject: USB: input: wacom_sys.c: fix up dev_err() usage 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 CC: Ping Cheng CC: Chris Bagwell CC: Eduard Hasenleithner Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/wacom_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 3db4684a0b7..821d2a958e4 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -122,7 +122,7 @@ static void wacom_sys_irq(struct urb *urb) usb_mark_last_busy(wacom->usbdev); retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&wacom->intf->dev, + dev_err(&wacom->wacom_wac.input->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } @@ -818,7 +818,7 @@ static int wacom_initialize_leds(struct wacom *wacom) } if (error) { - dev_err(&wacom->intf->dev, + dev_err(&wacom->wacom_wac.input->dev, "cannot create sysfs group err: %d\n", error); return error; } -- cgit v1.2.2 From f864b60ad0078b74c765f00f0600588b85c0a239 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 20:57:11 -0400 Subject: USB: input: usbtouchscreen.c: fix up dev_err() usage 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 CC: Henrik Rydberg CC: Rusty Russell CC: Viresh Kumar CC: Armando Visconti Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/usbtouchscreen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 955441cb030..4127cf7bb25 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -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; -- cgit v1.2.2 From 3b6aee237e889a189fd8c558207ca0e55818f744 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:24:28 -0700 Subject: USB: wacom: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. Cc: Dmitry Torokhov Cc: Ping Cheng Cc: Eduard Hasenleithner Cc: Chris Bagwell Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/wacom_sys.c | 10 ++++++---- drivers/input/tablet/wacom_wac.c | 16 +++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 821d2a958e4..ac29a68ac53 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -99,6 +99,7 @@ static int wacom_set_report(struct usb_interface *intf, u8 type, u8 id, static void wacom_sys_irq(struct urb *urb) { struct wacom *wacom = urb->context; + struct device *dev = &wacom->wacom_wac.input->dev; int retval; switch (urb->status) { @@ -109,10 +110,12 @@ static void wacom_sys_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, urb->status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - nonzero urb status received: %d", __func__, urb->status); + dev_dbg(dev, "%s - nonzero urb status received: %d\n", + __func__, urb->status); goto exit; } @@ -122,8 +125,7 @@ static void wacom_sys_irq(struct urb *urb) usb_mark_last_busy(wacom->usbdev); retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&wacom->wacom_wac.input->dev, - "%s - usb_submit_urb failed with result %d\n", + dev_err(dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index cecd35c8f0b..b327790e9a0 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -76,7 +76,8 @@ static int wacom_pl_irq(struct wacom_wac *wacom) int prox, pressure; if (data[0] != WACOM_REPORT_PENABLED) { - dbg("wacom_pl_irq: received unknown report #%d", data[0]); + dev_dbg(&input->dev, + "wacom_pl_irq: received unknown report #%d\n", data[0]); return 0; } @@ -175,7 +176,7 @@ static int wacom_dtu_irq(struct wacom_wac *wacom) struct input_dev *input = wacom->input; int prox = data[1] & 0x20, pressure; - dbg("wacom_dtu_irq: received report #%d", data[0]); + dev_dbg(&input->dev, "wacom_dtu_irq: received report #%d\n", data[0]); if (prox) { /* Going into proximity select tool */ @@ -211,7 +212,9 @@ static int wacom_graphire_irq(struct wacom_wac *wacom) int retval = 0; if (data[0] != WACOM_REPORT_PENABLED) { - dbg("wacom_graphire_irq: received unknown report #%d", data[0]); + dev_dbg(&input->dev, + "wacom_graphire_irq: received unknown report #%d\n", + data[0]); goto exit; } @@ -484,7 +487,9 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_INTUOSREAD && data[0] != WACOM_REPORT_INTUOSWRITE && data[0] != WACOM_REPORT_INTUOSPAD) { - dbg("wacom_intuos_irq: received unknown report #%d", data[0]); + dev_dbg(&input->dev, + "wacom_intuos_irq: received unknown report #%d\n", + data[0]); return 0; } @@ -830,7 +835,8 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) { char *data = wacom->data; - dbg("wacom_tpc_irq: received report #%d", data[0]); + dev_dbg(&wacom->input->dev, "wacom_tpc_irq: received report #%d\n", + data[0]); switch (len) { case WACOM_PKGLEN_TPC1FG: -- cgit v1.2.2 From f576125dc872f28da2f89c29bfc73ec0ff02f7d9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:26:05 -0700 Subject: USB: iforce: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. Cc: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/iforce/iforce-packets.c | 6 ++++-- drivers/input/joystick/iforce/iforce-usb.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 68f5f1e2d73..0d8f53b5ce5 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -266,12 +266,14 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) iforce->ctrl->status != -EINPROGRESS, HZ); if (iforce->ctrl->status) { - dbg("iforce->ctrl->status = %d", iforce->ctrl->status); + dev_dbg(&iforce->dev->dev, + "iforce->ctrl->status = %d\n", + iforce->ctrl->status); usb_unlink_urb(iforce->ctrl); return -1; } #else - dbg("iforce_get_id_packet: iforce->bus = USB!"); + printk(KERN_DEBUG "iforce_get_id_packet: iforce->bus = USB!\n"); #endif } break; diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 86d3538e104..15e8d6531e2 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -76,6 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce) static void iforce_usb_irq(struct urb *urb) { struct iforce *iforce = urb->context; + struct device *dev = &iforce->dev->dev; int status; switch (urb->status) { @@ -86,11 +87,12 @@ static void iforce_usb_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", - __func__, urb->status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - urb has status of: %d", __func__, urb->status); + dev_dbg(dev, "%s - urb has status of: %d\n", + __func__, urb->status); goto exit; } @@ -100,8 +102,7 @@ static void iforce_usb_irq(struct urb *urb) exit: status = usb_submit_urb (urb, GFP_ATOMIC); if (status) - dev_err(&iforce->dev->dev, - "%s - usb_submit_urb failed with result %d\n", + dev_err(dev, "%s - usb_submit_urb failed with result %d\n", __func__, status); } @@ -111,7 +112,8 @@ static void iforce_usb_out(struct urb *urb) if (urb->status) { clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); - dbg("urb->status %d, exiting", urb->status); + dev_dbg(&iforce->dev->dev, "urb->status %d, exiting\n", + urb->status); return; } -- cgit v1.2.2 From c4f0bbcd1d53dc40e2ac56f2ab116f9ba612a8ee Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:32:59 -0700 Subject: USB: xpad.c: remove dbg() usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov CC: "Magnus Hörlin" CC: Rusty Russell CC: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/xpad.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index d760031430a..2e106b0796c 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -457,6 +457,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha static void xpad_irq_in(struct urb *urb) { struct usb_xpad *xpad = urb->context; + struct device *dev = &xpad->dev->dev; int retval, status; status = urb->status; @@ -469,11 +470,11 @@ static void xpad_irq_in(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", + dev_dbg(dev, "%s - urb shutting down with status: %d\n", __func__, status); return; default: - dbg("%s - nonzero urb status received: %d", + dev_dbg(dev, "%s - nonzero urb status received: %d\n", __func__, status); goto exit; } @@ -492,13 +493,15 @@ static void xpad_irq_in(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&xpad->dev->dev, - "%s - usb_submit_urb failed with result %d\n", + dev_err(dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } static void xpad_bulk_out(struct urb *urb) { + struct usb_xpad *xpad = urb->context; + struct device *dev = &xpad->dev->dev; + switch (urb->status) { case 0: /* success */ @@ -507,10 +510,12 @@ static void xpad_bulk_out(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, urb->status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); break; default: - dbg("%s - nonzero urb status received: %d", __func__, urb->status); + dev_dbg(dev, "%s - nonzero urb status received: %d\n", + __func__, urb->status); } } @@ -518,6 +523,7 @@ static void xpad_bulk_out(struct urb *urb) static void xpad_irq_out(struct urb *urb) { struct usb_xpad *xpad = urb->context; + struct device *dev = &xpad->dev->dev; int retval, status; status = urb->status; @@ -531,19 +537,20 @@ static void xpad_irq_out(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, status); return; default: - dbg("%s - nonzero urb status received: %d", __func__, status); + dev_dbg(dev, "%s - nonzero urb status received: %d\n", + __func__, status); goto exit; } exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&xpad->dev->dev, - "%s - usb_submit_urb failed with result %d\n", + dev_err(dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } @@ -657,7 +664,8 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect return usb_submit_urb(xpad->irq_out, GFP_ATOMIC); default: - dbg("%s - rumble command sent to unsupported xpad type: %d", + dev_dbg(&xpad->dev->dev, + "%s - rumble command sent to unsupported xpad type: %d\n", __func__, xpad->xtype); return -1; } -- cgit v1.2.2 From 8b0725c0593871106d24ed94e7a14cf2316cb21d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:03 -0700 Subject: USB: powermate.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/powermate.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 3091b82b1f9..d16717e8e9c 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c @@ -85,6 +85,7 @@ static void powermate_config_complete(struct urb *urb); static void powermate_irq(struct urb *urb) { struct powermate_device *pm = urb->context; + struct device *dev = &pm->input->dev; int retval; switch (urb->status) { @@ -95,10 +96,12 @@ static void powermate_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, urb->status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - nonzero urb status received: %d", __func__, urb->status); + dev_dbg(dev, "%s - nonzero urb status received: %d\n", + __func__, urb->status); goto exit; } @@ -110,8 +113,7 @@ static void powermate_irq(struct urb *urb) exit: retval = usb_submit_urb (urb, GFP_ATOMIC); if (retval) - dev_err(&pm->input->dev, - "%s - usb_submit_urb failed with result: %d\n", + dev_err(dev, "%s - usb_submit_urb failed with result: %d\n", __func__, retval); } -- cgit v1.2.2 From 938476f9237ee97480ddb091c06d67851bb4d7e9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:03 -0700 Subject: USB: yealink.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Henk Vergonet CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/yealink.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 9f71bb174ee..37b126c06fc 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c @@ -438,7 +438,8 @@ static void urb_irq_callback(struct urb *urb) break; case CMD_SCANCODE: - dbg("get scancode %x", yld->irq_data->data[0]); + dev_dbg(&yld->idev->dev, "get scancode %x\n", + yld->irq_data->data[0]); report_key(yld, map_p1k_to_key(yld->irq_data->data[0])); break; @@ -517,7 +518,7 @@ static int input_open(struct input_dev *dev) struct yealink_dev *yld = input_get_drvdata(dev); int i, ret; - dbg("%s", __func__); + dev_dbg(&yld->idev->dev, "%s\n", __func__); /* force updates to device */ for (i = 0; imaster); i++) @@ -532,8 +533,9 @@ static int input_open(struct input_dev *dev) yld->ctl_data->size = 10; yld->ctl_data->sum = 0x100-CMD_INIT-10; if ((ret = usb_submit_urb(yld->urb_ctl, GFP_KERNEL)) != 0) { - dbg("%s - usb_submit_urb failed with result %d", - __func__, ret); + dev_dbg(&yld->idev->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, ret); return ret; } return 0; -- cgit v1.2.2 From 67946d136879a129fccd35b79a87e1f05ace148e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:04 -0700 Subject: USB: appletouch.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Alessandro Rubini CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/appletouch.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index a5f15477a7e..d0a590f87c2 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -401,6 +401,7 @@ static inline void atp_report_fingers(struct input_dev *input, int fingers) static int atp_status_check(struct urb *urb) { struct atp *dev = urb->context; + struct input_dev *idev = dev->input; switch (urb->status) { case 0: @@ -408,8 +409,8 @@ static int atp_status_check(struct urb *urb) break; case -EOVERFLOW: if (!dev->overflow_warned) { - printk(KERN_WARNING "appletouch: OVERFLOW with data " - "length %d, actual length is %d\n", + dev_warn(&idev->dev, + "appletouch: OVERFLOW with data length %d, actual length is %d\n", dev->info->datalen, dev->urb->actual_length); dev->overflow_warned = true; } @@ -417,13 +418,15 @@ static int atp_status_check(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* This urb is terminated, clean up */ - dbg("atp_complete: urb shutting down with status: %d", - urb->status); + dev_dbg(&idev->dev, + "atp_complete: urb shutting down with status: %d\n", + urb->status); return ATP_URB_STATUS_ERROR_FATAL; default: - dbg("atp_complete: nonzero urb status received: %d", - urb->status); + dev_dbg(&idev->dev, + "atp_complete: nonzero urb status received: %d\n", + urb->status); return ATP_URB_STATUS_ERROR; } @@ -446,7 +449,8 @@ static void atp_detect_size(struct atp *dev) for (i = dev->info->xsensors; i < ATP_XSENSORS; i++) { if (dev->xy_cur[i]) { - printk(KERN_INFO "appletouch: 17\" model detected.\n"); + dev_info(&dev->input->dev, + "appletouch: 17\" model detected.\n"); input_set_abs_params(dev->input, ABS_X, 0, (dev->info->xsensors_17 - 1) * -- cgit v1.2.2 From bd028769f741b88dc06831bfe7edb181671758ea Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:05 -0700 Subject: USB: bcm5974.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Henrik Rydberg CC: Alessandro Rubini CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/bcm5974.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index e2e8d815da7..e32928ee7cc 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -631,6 +631,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) static void bcm5974_irq_button(struct urb *urb) { struct bcm5974 *dev = urb->context; + struct input_dev *idev = dev->input; int error; switch (urb->status) { @@ -640,10 +641,11 @@ static void bcm5974_irq_button(struct urb *urb) case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: - dbg("bcm5974: button urb shutting down: %d", urb->status); + dev_dbg(&idev->dev, "button urb shutting down: %d\n", + urb->status); return; default: - dbg("bcm5974: button urb status: %d", urb->status); + dev_dbg(&idev->dev, "button urb status: %d\n", urb->status); goto exit; } @@ -654,12 +656,13 @@ static void bcm5974_irq_button(struct urb *urb) exit: error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); if (error) - dev_err(&dev->input->dev, "button urb failed: %d\n", error); + dev_err(&idev->dev, "button urb failed: %d\n", error); } static void bcm5974_irq_trackpad(struct urb *urb) { struct bcm5974 *dev = urb->context; + struct input_dev *idev = dev->input; int error; switch (urb->status) { @@ -669,10 +672,11 @@ static void bcm5974_irq_trackpad(struct urb *urb) case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: - dbg("bcm5974: trackpad urb shutting down: %d", urb->status); + dev_dbg(&idev->dev, "trackpad urb shutting down: %d\n", + urb->status); return; default: - dbg("bcm5974: trackpad urb status: %d", urb->status); + dev_dbg(&idev->dev, "trackpad urb status: %d\n", urb->status); goto exit; } @@ -687,7 +691,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) exit: error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); if (error) - dev_err(&dev->input->dev, "trackpad urb failed: %d\n", error); + dev_err(&idev->dev, "trackpad urb failed: %d\n", error); } /* -- cgit v1.2.2 From eeba1ae13cbddc6e9cbc4adcd0d9fd686ba09f5f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:09 -0700 Subject: USB: acecad.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/acecad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index a81a2b06028..baa9d4ad0d0 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -73,10 +73,12 @@ static void usb_acecad_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, urb->status); + dev_dbg(&dev->dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - nonzero urb status received: %d", __func__, urb->status); + dev_dbg(&dev->dev, "%s - nonzero urb status received: %d\n", + __func__, urb->status); goto resubmit; } -- cgit v1.2.2 From 8fb6321b6bd9ebcc03243f27fe98e18e246a5c97 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:12 -0700 Subject: USB: aiptek.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov CC: Jesper Juhl CC: JJ Ding CC: Edwin van Vliet Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/aiptek.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index dc16bfd2473..37dba769bf0 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c @@ -447,13 +447,15 @@ static void aiptek_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* This urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", - __func__, urb->status); + dev_dbg(&inputdev->dev, + "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - nonzero urb status received: %d", - __func__, urb->status); + dev_dbg(&inputdev->dev, + "%s - nonzero urb status received: %d\n", + __func__, urb->status); goto exit; } @@ -785,7 +787,7 @@ static void aiptek_irq(struct urb *urb) 1 | AIPTEK_REPORT_TOOL_UNKNOWN); input_sync(inputdev); } else { - dbg("Unknown report %d", data[0]); + dev_dbg(&inputdev->dev, "Unknown report %d\n", data[0]); } /* Jitter may occur when the user presses a button on the stlyus @@ -913,8 +915,9 @@ aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data) if ((ret = aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { - dbg("aiptek_program: failed, tried to send: 0x%02x 0x%02x", - command, data); + dev_dbg(&aiptek->inputdev->dev, + "aiptek_program: failed, tried to send: 0x%02x 0x%02x\n", + command, data); } kfree(buf); return ret < 0 ? ret : 0; @@ -948,8 +951,9 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data) if ((ret = aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { - dbg("aiptek_query failed: returned 0x%02x 0x%02x 0x%02x", - buf[0], buf[1], buf[2]); + dev_dbg(&aiptek->inputdev->dev, + "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n", + buf[0], buf[1], buf[2]); ret = -EIO; } else { ret = get_unaligned_le16(buf + 1); -- cgit v1.2.2 From c6f880a7812766b896edcba51ac8a449ff5d4320 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:16 -0700 Subject: USB: gtco.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/gtco.c | 87 +++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 42 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index 937215373e9..422b1a2ef30 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -200,6 +200,7 @@ struct hid_descriptor static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) { + struct device *ddev = &device->inputdevice->dev; int x, i = 0; /* Tag primitive vars */ @@ -226,7 +227,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, char indentstr[10] = ""; - dbg("======>>>>>>PARSE<<<<<<======"); + dev_dbg(ddev, "======>>>>>>PARSE<<<<<<======\n"); /* Walk this report and pull out the info we need */ while (i < length) { @@ -275,11 +276,11 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, else if (data == 3) strcpy(globtype, "Var|Const"); - dbg("::::: Saving Report: %d input #%d Max: 0x%X(%d) Min:0x%X(%d) of %d bits", - globalval[TAG_GLOB_REPORT_ID], inputnum, - globalval[TAG_GLOB_LOG_MAX], globalval[TAG_GLOB_LOG_MAX], - globalval[TAG_GLOB_LOG_MIN], globalval[TAG_GLOB_LOG_MIN], - globalval[TAG_GLOB_REPORT_SZ] * globalval[TAG_GLOB_REPORT_CNT]); + dev_dbg(ddev, "::::: Saving Report: %d input #%d Max: 0x%X(%d) Min:0x%X(%d) of %d bits\n", + globalval[TAG_GLOB_REPORT_ID], inputnum, + globalval[TAG_GLOB_LOG_MAX], globalval[TAG_GLOB_LOG_MAX], + globalval[TAG_GLOB_LOG_MIN], globalval[TAG_GLOB_LOG_MIN], + globalval[TAG_GLOB_REPORT_SZ] * globalval[TAG_GLOB_REPORT_CNT]); /* @@ -290,7 +291,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, */ switch (inputnum) { case 0: /* X coord */ - dbg("GER: X Usage: 0x%x", usage); + dev_dbg(ddev, "GER: X Usage: 0x%x\n", usage); if (device->max_X == 0) { device->max_X = globalval[TAG_GLOB_LOG_MAX]; device->min_X = globalval[TAG_GLOB_LOG_MIN]; @@ -298,7 +299,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, break; case 1: /* Y coord */ - dbg("GER: Y Usage: 0x%x", usage); + dev_dbg(ddev, "GER: Y Usage: 0x%x\n", usage); if (device->max_Y == 0) { device->max_Y = globalval[TAG_GLOB_LOG_MAX]; device->min_Y = globalval[TAG_GLOB_LOG_MIN]; @@ -348,10 +349,10 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, maintype = 'S'; if (data == 0) { - dbg("======>>>>>> Physical"); + dev_dbg(ddev, "======>>>>>> Physical\n"); strcpy(globtype, "Physical"); } else - dbg("======>>>>>>"); + dev_dbg(ddev, "======>>>>>>\n"); /* Indent the debug output */ indent++; @@ -366,7 +367,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, break; case TAG_MAIN_COL_END: - dbg("<<<<<<======"); + dev_dbg(ddev, "<<<<<<======\n"); maintype = 'E'; indent--; for (x = 0; x < indent; x++) @@ -382,18 +383,18 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, switch (size) { case 1: - dbg("%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x", - indentstr, tag, maintype, size, globtype, data); + dev_dbg(ddev, "%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x\n", + indentstr, tag, maintype, size, globtype, data); break; case 2: - dbg("%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x", - indentstr, tag, maintype, size, globtype, data16); + dev_dbg(ddev, "%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x\n", + indentstr, tag, maintype, size, globtype, data16); break; case 4: - dbg("%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x", - indentstr, tag, maintype, size, globtype, data32); + dev_dbg(ddev, "%sMAINTAG:(%d) %c SIZE: %d Data: %s 0x%x\n", + indentstr, tag, maintype, size, globtype, data32); break; } break; @@ -463,26 +464,26 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, if (tag < TAG_GLOB_MAX) { switch (size) { case 1: - dbg("%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x", - indentstr, globtype, tag, size, data); + dev_dbg(ddev, "%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x\n", + indentstr, globtype, tag, size, data); globalval[tag] = data; break; case 2: - dbg("%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x", - indentstr, globtype, tag, size, data16); + dev_dbg(ddev, "%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x\n", + indentstr, globtype, tag, size, data16); globalval[tag] = data16; break; case 4: - dbg("%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x", - indentstr, globtype, tag, size, data32); + dev_dbg(ddev, "%sGLOBALTAG:%s(%d) SIZE: %d Data: 0x%x\n", + indentstr, globtype, tag, size, data32); globalval[tag] = data32; break; } } else { - dbg("%sGLOBALTAG: ILLEGAL TAG:%d SIZE: %d ", - indentstr, tag, size); + dev_dbg(ddev, "%sGLOBALTAG: ILLEGAL TAG:%d SIZE: %d\n", + indentstr, tag, size); } break; @@ -509,18 +510,18 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report, switch (size) { case 1: - dbg("%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x", - indentstr, tag, globtype, size, data); + dev_dbg(ddev, "%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x\n", + indentstr, tag, globtype, size, data); break; case 2: - dbg("%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x", - indentstr, tag, globtype, size, data16); + dev_dbg(ddev, "%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x\n", + indentstr, tag, globtype, size, data16); break; case 4: - dbg("%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x", - indentstr, tag, globtype, size, data32); + dev_dbg(ddev, "%sLOCALTAG:(%d) %s SIZE: %d Data: 0x%x\n", + indentstr, tag, globtype, size, data32); break; } @@ -712,8 +713,9 @@ static void gtco_urb_callback(struct urb *urbinfo) * the rest as 0 */ val = device->buffer[5] & MASK_BUTTON; - dbg("======>>>>>>REPORT 1: val 0x%X(%d)", - val, val); + dev_dbg(&inputdev->dev, + "======>>>>>>REPORT 1: val 0x%X(%d)\n", + val, val); /* * We don't apply any meaning to the button @@ -872,14 +874,14 @@ static int gtco_probe(struct usb_interface *usbinterface, endpoint = &usbinterface->altsetting[0].endpoint[0].desc; /* Some debug */ - dbg("gtco # interfaces: %d", usbinterface->num_altsetting); - dbg("num endpoints: %d", usbinterface->cur_altsetting->desc.bNumEndpoints); - dbg("interface class: %d", usbinterface->cur_altsetting->desc.bInterfaceClass); - dbg("endpoint: attribute:0x%x type:0x%x", endpoint->bmAttributes, endpoint->bDescriptorType); + dev_dbg(&usbinterface->dev, "gtco # interfaces: %d\n", usbinterface->num_altsetting); + dev_dbg(&usbinterface->dev, "num endpoints: %d\n", usbinterface->cur_altsetting->desc.bNumEndpoints); + dev_dbg(&usbinterface->dev, "interface class: %d\n", usbinterface->cur_altsetting->desc.bInterfaceClass); + dev_dbg(&usbinterface->dev, "endpoint: attribute:0x%x type:0x%x\n", endpoint->bmAttributes, endpoint->bDescriptorType); if (usb_endpoint_xfer_int(endpoint)) - dbg("endpoint: we have interrupt endpoint\n"); + dev_dbg(&usbinterface->dev, "endpoint: we have interrupt endpoint\n"); - dbg("endpoint extra len:%d ", usbinterface->altsetting[0].extralen); + dev_dbg(&usbinterface->dev, "endpoint extra len:%d\n", usbinterface->altsetting[0].extralen); /* * Find the HID descriptor so we can find out the size of the @@ -893,8 +895,9 @@ static int gtco_probe(struct usb_interface *usbinterface, goto err_free_urb; } - dbg("Extra descriptor success: type:%d len:%d", - hid_desc->bDescriptorType, hid_desc->wDescriptorLength); + dev_dbg(&usbinterface->dev, + "Extra descriptor success: type:%d len:%d\n", + hid_desc->bDescriptorType, hid_desc->wDescriptorLength); report = kzalloc(le16_to_cpu(hid_desc->wDescriptorLength), GFP_KERNEL); if (!report) { @@ -915,7 +918,7 @@ static int gtco_probe(struct usb_interface *usbinterface, le16_to_cpu(hid_desc->wDescriptorLength), 5000); /* 5 secs */ - dbg("usb_control_msg result: %d", result); + dev_dbg(&usbinterface->dev, "usb_control_msg result: %d\n", result); if (result == le16_to_cpu(hid_desc->wDescriptorLength)) { parse_hid_report_descriptor(gtco, report, result); break; -- cgit v1.2.2 From 6d0f7dcba6ea0d04fb0d1374188c2479abf7f951 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:20 -0700 Subject: USB: kbtab.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/kbtab.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index be717d758cb..a39d1761a6c 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c @@ -53,10 +53,12 @@ static void kbtab_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", __func__, urb->status); + dev_dbg(&dev->dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - nonzero urb status received: %d", __func__, urb->status); + dev_dbg(&dev->dev, "%s - nonzero urb status received: %d\n", + __func__, urb->status); goto exit; } -- cgit v1.2.2 From b741ab9da614b08da51cffa961435bc81314f3c4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 May 2012 21:33:23 -0700 Subject: USB: usbtouchscreen.c: remove dbg() usage dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov CC: Henrik Rydberg CC: Rusty Russell CC: Viresh Kumar CC: Armando Visconti Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/usbtouchscreen.c | 68 ++++++++++++++++++------------ 1 file changed, 42 insertions(+), 26 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 4127cf7bb25..100eded96b0 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -269,8 +269,9 @@ static int e2i_init(struct usbtouch_usb *usbtouch) 0x01, 0x02, 0x0000, 0x0081, NULL, 0, USB_CTRL_SET_TIMEOUT); - dbg("%s - usb_control_msg - E2I_RESET - bytes|err: %d", - __func__, ret); + dev_dbg(&usbtouch->input->dev, + "%s - usb_control_msg - E2I_RESET - bytes|err: %d\n", + __func__, ret); return ret; } @@ -425,8 +426,9 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) MTOUCHUSB_RESET, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT); - dbg("%s - usb_control_msg - MTOUCHUSB_RESET - bytes|err: %d", - __func__, ret); + dev_dbg(&usbtouch->input->dev, + "%s - usb_control_msg - MTOUCHUSB_RESET - bytes|err: %d\n", + __func__, ret); if (ret < 0) return ret; msleep(150); @@ -436,8 +438,9 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) MTOUCHUSB_ASYNC_REPORT, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 1, 1, NULL, 0, USB_CTRL_SET_TIMEOUT); - dbg("%s - usb_control_msg - MTOUCHUSB_ASYNC_REPORT - bytes|err: %d", - __func__, ret); + dev_dbg(&usbtouch->input->dev, + "%s - usb_control_msg - MTOUCHUSB_ASYNC_REPORT - bytes|err: %d\n", + __func__, ret); if (ret >= 0) break; if (ret != -EPIPE) @@ -737,27 +740,29 @@ static int jastec_read_data(struct usbtouch_usb *dev, unsigned char *pkt) #ifdef CONFIG_TOUCHSCREEN_USB_ZYTRONIC static int zytronic_read_data(struct usbtouch_usb *dev, unsigned char *pkt) { + struct input_dev *input = dev->input; + switch (pkt[0]) { case 0x3A: /* command response */ - dbg("%s: Command response %d", __func__, pkt[1]); + dev_dbg(&input->dev, "%s: Command response %d\n", __func__, pkt[1]); break; case 0xC0: /* down */ dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); dev->touch = 1; - dbg("%s: down %d,%d", __func__, dev->x, dev->y); + dev_dbg(&input->dev, "%s: down %d,%d\n", __func__, dev->x, dev->y); return 1; case 0x80: /* up */ dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); dev->touch = 0; - dbg("%s: up %d,%d", __func__, dev->x, dev->y); + dev_dbg(&input->dev, "%s: up %d,%d\n", __func__, dev->x, dev->y); return 1; default: - dbg("%s: Unknown return %d", __func__, pkt[0]); + dev_dbg(&input->dev, "%s: Unknown return %d\n", __func__, pkt[0]); break; } @@ -812,7 +817,8 @@ static int nexio_alloc(struct usbtouch_usb *usbtouch) priv->ack = usb_alloc_urb(0, GFP_KERNEL); if (!priv->ack) { - dbg("%s - usb_alloc_urb failed: usbtouch->ack", __func__); + dev_dbg(&usbtouch->input->dev, + "%s - usb_alloc_urb failed: usbtouch->ack\n", __func__); goto err_ack_buf; } @@ -1349,6 +1355,7 @@ out_flush_buf: static void usbtouch_irq(struct urb *urb) { struct usbtouch_usb *usbtouch = urb->context; + struct device *dev = &usbtouch->input->dev; int retval; switch (urb->status) { @@ -1357,20 +1364,21 @@ static void usbtouch_irq(struct urb *urb) break; case -ETIME: /* this urb is timing out */ - dbg("%s - urb timed out - was the device unplugged?", - __func__); + dev_dbg(dev, + "%s - urb timed out - was the device unplugged?\n", + __func__); return; case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: case -EPIPE: /* this urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", - __func__, urb->status); + dev_dbg(dev, "%s - urb shutting down with status: %d\n", + __func__, urb->status); return; default: - dbg("%s - nonzero urb status received: %d", - __func__, urb->status); + dev_dbg(dev, "%s - nonzero urb status received: %d\n", + __func__, urb->status); goto exit; } @@ -1457,8 +1465,9 @@ static int usbtouch_reset_resume(struct usb_interface *intf) if (usbtouch->type->init) { err = usbtouch->type->init(usbtouch); if (err) { - dbg("%s - type->init() failed, err: %d", - __func__, err); + dev_dbg(&input->dev, + "%s - type->init() failed, err: %d\n", + __func__, err); return err; } } @@ -1533,7 +1542,8 @@ static int usbtouch_probe(struct usb_interface *intf, usbtouch->irq = usb_alloc_urb(0, GFP_KERNEL); if (!usbtouch->irq) { - dbg("%s - usb_alloc_urb failed: usbtouch->irq", __func__); + dev_dbg(&intf->dev, + "%s - usb_alloc_urb failed: usbtouch->irq\n", __func__); goto out_free_buffers; } @@ -1595,7 +1605,9 @@ static int usbtouch_probe(struct usb_interface *intf, if (type->alloc) { err = type->alloc(usbtouch); if (err) { - dbg("%s - type->alloc() failed, err: %d", __func__, err); + dev_dbg(&intf->dev, + "%s - type->alloc() failed, err: %d\n", + __func__, err); goto out_free_urb; } } @@ -1604,14 +1616,18 @@ static int usbtouch_probe(struct usb_interface *intf, if (type->init) { err = type->init(usbtouch); if (err) { - dbg("%s - type->init() failed, err: %d", __func__, err); + dev_dbg(&intf->dev, + "%s - type->init() failed, err: %d\n", + __func__, err); goto out_do_exit; } } err = input_register_device(usbtouch->input); if (err) { - dbg("%s - input_register_device failed, err: %d", __func__, err); + dev_dbg(&intf->dev, + "%s - input_register_device failed, err: %d\n", + __func__, err); goto out_do_exit; } @@ -1652,12 +1668,12 @@ static void usbtouch_disconnect(struct usb_interface *intf) { struct usbtouch_usb *usbtouch = usb_get_intfdata(intf); - dbg("%s - called", __func__); - if (!usbtouch) return; - dbg("%s - usbtouch is initialized, cleaning up", __func__); + dev_dbg(&usbtouch->input->dev, + "%s - usbtouch is initialized, cleaning up\n", __func__); + usb_set_intfdata(intf, NULL); /* this will stop IO via close */ input_unregister_device(usbtouch->input); -- cgit v1.2.2 From a852d78e4e24f2200fa1764ca3366b4fa4fd072a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:23:04 -0700 Subject: USB: input: iforce: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. Cc: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/iforce/iforce-packets.c | 4 ++-- drivers/input/joystick/iforce/iforce-usb.c | 7 ++++--- drivers/input/joystick/iforce/iforce.h | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 0d8f53b5ce5..08f98f2eaf8 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -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->dev->dev, + dev_err(&iforce->intf->dev, "usb_submit_urb failed %d\n", status); return -1; } @@ -266,7 +266,7 @@ int iforce_get_id_packet(struct iforce *iforce, char *packet) iforce->ctrl->status != -EINPROGRESS, HZ); if (iforce->ctrl->status) { - dev_dbg(&iforce->dev->dev, + dev_dbg(&iforce->intf->dev, "iforce->ctrl->status = %d\n", iforce->ctrl->status); usb_unlink_urb(iforce->ctrl); diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 15e8d6531e2..d96aa27dfcd 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -64,7 +64,7 @@ void iforce_usb_xmit(struct iforce *iforce) if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) { clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); - dev_warn(&iforce->dev->dev, "usb_submit_urb failed %d\n", n); + dev_warn(&iforce->intf->dev, "usb_submit_urb failed %d\n", n); } /* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended. @@ -76,7 +76,7 @@ void iforce_usb_xmit(struct iforce *iforce) static void iforce_usb_irq(struct urb *urb) { struct iforce *iforce = urb->context; - struct device *dev = &iforce->dev->dev; + struct device *dev = &iforce->intf->dev; int status; switch (urb->status) { @@ -112,7 +112,7 @@ static void iforce_usb_out(struct urb *urb) if (urb->status) { clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags); - dev_dbg(&iforce->dev->dev, "urb->status %d, exiting\n", + dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n", urb->status); return; } @@ -158,6 +158,7 @@ static int iforce_usb_probe(struct usb_interface *intf, iforce->bus = IFORCE_USB; iforce->usbdev = dev; + iforce->intf = intf; iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE; iforce->cr.wIndex = 0; diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index 9f494b75848..b1d7d9b0eb8 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h @@ -115,6 +115,7 @@ struct iforce { #endif #ifdef CONFIG_JOYSTICK_IFORCE_USB struct usb_device *usbdev; /* USB transfer */ + struct usb_interface *intf; struct urb *irq, *out, *ctrl; struct usb_ctrlrequest cr; #endif -- cgit v1.2.2 From 8818e4190f0e04ad20a30e7488dcdd3029b4b96d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:32:53 -0700 Subject: USB: input: xpad.c: fix up dev_* messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov CC: "Magnus Hörlin" CC: Rusty Russell CC: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/xpad.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 2e106b0796c..ee16fb67b7a 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -252,6 +252,7 @@ MODULE_DEVICE_TABLE (usb, xpad_table); struct usb_xpad { struct input_dev *dev; /* input device interface */ struct usb_device *udev; /* usb device */ + struct usb_interface *intf; /* usb interface */ int pad_present; @@ -457,7 +458,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha static void xpad_irq_in(struct urb *urb) { struct usb_xpad *xpad = urb->context; - struct device *dev = &xpad->dev->dev; + struct device *dev = &xpad->intf->dev; int retval, status; status = urb->status; @@ -500,7 +501,7 @@ exit: static void xpad_bulk_out(struct urb *urb) { struct usb_xpad *xpad = urb->context; - struct device *dev = &xpad->dev->dev; + struct device *dev = &xpad->intf->dev; switch (urb->status) { case 0: @@ -523,7 +524,7 @@ static void xpad_bulk_out(struct urb *urb) static void xpad_irq_out(struct urb *urb) { struct usb_xpad *xpad = urb->context; - struct device *dev = &xpad->dev->dev; + struct device *dev = &xpad->intf->dev; int retval, status; status = urb->status; @@ -855,6 +856,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id } xpad->udev = udev; + xpad->intf = intf; xpad->mapping = xpad_device[i].mapping; xpad->xtype = xpad_device[i].xtype; -- cgit v1.2.2 From ab242a73a109c227d6ed0fcccab5dd2d9e220b07 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:32:55 -0700 Subject: USB: input: cm109.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov CC: Axel Lin Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/cm109.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index 9e76ab18e94..082684e7f39 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c @@ -327,7 +327,7 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); if (error) - dev_err(&dev->idev->dev, + dev_err(&dev->intf->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", __func__, error); } @@ -341,7 +341,7 @@ static void cm109_urb_irq_callback(struct urb *urb) const int status = urb->status; int error; - dev_dbg(&urb->dev->dev, "### URB IRQ: [0x%02x 0x%02x 0x%02x 0x%02x] keybit=0x%02x\n", + dev_dbg(&dev->intf->dev, "### URB IRQ: [0x%02x 0x%02x 0x%02x 0x%02x] keybit=0x%02x\n", dev->irq_data->byte[0], dev->irq_data->byte[1], dev->irq_data->byte[2], @@ -351,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb) if (status) { if (status == -ESHUTDOWN) return; - dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status); + dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); } /* Special keys */ @@ -398,7 +398,7 @@ static void cm109_urb_irq_callback(struct urb *urb) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); if (error) - dev_err(&dev->idev->dev, + dev_err(&dev->intf->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", __func__, error); } @@ -412,14 +412,14 @@ static void cm109_urb_ctl_callback(struct urb *urb) const int status = urb->status; int error; - dev_dbg(&urb->dev->dev, "### URB CTL: [0x%02x 0x%02x 0x%02x 0x%02x]\n", + dev_dbg(&dev->intf->dev, "### URB CTL: [0x%02x 0x%02x 0x%02x 0x%02x]\n", dev->ctl_data->byte[0], dev->ctl_data->byte[1], dev->ctl_data->byte[2], dev->ctl_data->byte[3]); if (status) - dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status); + dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); spin_lock(&dev->ctl_submit_lock); @@ -436,7 +436,7 @@ static void cm109_urb_ctl_callback(struct urb *urb) dev->irq_urb_pending = 1; error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); if (error) - dev_err(&dev->idev->dev, + dev_err(&dev->intf->dev, "%s: usb_submit_urb (urb_irq) failed %d\n", __func__, error); } @@ -480,7 +480,7 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on) dev->ctl_data, USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); if (error < 0 && error != -EINTR) - dev_err(&dev->idev->dev, "%s: usb_control_msg() failed %d\n", + dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n", __func__, error); } @@ -542,7 +542,7 @@ static int cm109_input_open(struct input_dev *idev) error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); if (error) - dev_err(&idev->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", + dev_err(&dev->intf->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", __func__, error); else dev->open = 1; @@ -579,7 +579,7 @@ static int cm109_input_ev(struct input_dev *idev, unsigned int type, { struct cm109_dev *dev = input_get_drvdata(idev); - dev_dbg(&dev->udev->dev, + dev_dbg(&dev->intf->dev, "input_ev: type=%u code=%u value=%d\n", type, code, value); if (type != EV_SND) -- cgit v1.2.2 From 419b1a11fbe7889f8c3e62b0ef33e8b393279563 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:32:58 -0700 Subject: USB: input: keyspan_remote.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/keyspan_remote.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index 7f017d497d8..290fa5f97de 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c @@ -157,7 +157,7 @@ static int keyspan_load_tester(struct usb_keyspan* dev, int bits_needed) * though so it's not too big a deal */ if (dev->data.pos >= dev->data.len) { - dev_dbg(&dev->udev->dev, + dev_dbg(&dev->interface->dev, "%s - Error ran out of data. pos: %d, len: %d\n", __func__, dev->data.pos, dev->data.len); return -1; @@ -267,7 +267,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - dev_err(&remote->input->dev, + dev_err(&remote->interface->dev, "%s - Unknown sequence found in system data.\n", __func__); remote->stage = 0; @@ -288,7 +288,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - dev_err(&remote->input->dev, + dev_err(&remote->interface->dev, "%s - Unknown sequence found in button data.\n", __func__); remote->stage = 0; @@ -306,7 +306,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 6; remote->data.bits_left -= 6; } else { - dev_err(&remote->input->dev, + dev_err(&remote->interface->dev, "%s - Error in message, invalid toggle.\n", __func__); remote->stage = 0; @@ -318,11 +318,11 @@ static void keyspan_check_data(struct usb_keyspan *remote) remote->data.tester = remote->data.tester >> 5; remote->data.bits_left -= 5; } else { - dev_err(&remote->input->dev, + dev_err(&remote->interface->dev, "Bad message received, no stop bit found.\n"); } - dev_dbg(&remote->udev->dev, + dev_dbg(&remote->interface->dev, "%s found valid message: system: %d, button: %d, toggle: %d\n", __func__, message.system, message.button, message.toggle); @@ -404,7 +404,7 @@ static void keyspan_irq_recv(struct urb *urb) resubmit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&dev->input->dev, + dev_err(&dev->interface->dev, "%s - usb_submit_urb failed with result: %d\n", __func__, retval); } -- cgit v1.2.2 From c25e647836cd53f2da7ceff6fabf2603b4362212 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:00 -0700 Subject: USB: input: powermate.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/powermate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index d16717e8e9c..49c0c3ebd32 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c @@ -65,6 +65,7 @@ struct powermate_device { struct urb *irq, *config; struct usb_ctrlrequest *configcr; struct usb_device *udev; + struct usb_interface *intf; struct input_dev *input; spinlock_t lock; int static_brightness; @@ -85,7 +86,7 @@ static void powermate_config_complete(struct urb *urb); static void powermate_irq(struct urb *urb) { struct powermate_device *pm = urb->context; - struct device *dev = &pm->input->dev; + struct device *dev = &pm->intf->dev; int retval; switch (urb->status) { @@ -333,6 +334,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i goto fail3; pm->udev = udev; + pm->intf = intf; pm->input = input_dev; usb_make_path(udev, pm->phys, sizeof(pm->phys)); -- cgit v1.2.2 From 73e66ceada0b51279ffd4a6f5bffe79d7168d4e8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:01 -0700 Subject: USB: input: yealink.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Henk Vergonet CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/yealink.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 37b126c06fc..285a5bd6cbc 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c @@ -101,6 +101,7 @@ static const struct lcd_segment_map { struct yealink_dev { struct input_dev *idev; /* input device */ struct usb_device *udev; /* usb device */ + struct usb_interface *intf; /* usb interface */ /* irq input channel */ struct yld_ctl_packet *irq_data; @@ -428,7 +429,7 @@ static void urb_irq_callback(struct urb *urb) int ret, status = urb->status; if (status) - dev_err(&yld->idev->dev, "%s - urb status %d\n", + dev_err(&yld->intf->dev, "%s - urb status %d\n", __func__, status); switch (yld->irq_data->cmd) { @@ -438,14 +439,14 @@ static void urb_irq_callback(struct urb *urb) break; case CMD_SCANCODE: - dev_dbg(&yld->idev->dev, "get scancode %x\n", + dev_dbg(&yld->intf->dev, "get scancode %x\n", yld->irq_data->data[0]); report_key(yld, map_p1k_to_key(yld->irq_data->data[0])); break; default: - dev_err(&yld->idev->dev, "unexpected response %x\n", + dev_err(&yld->intf->dev, "unexpected response %x\n", yld->irq_data->cmd); } @@ -454,7 +455,7 @@ static void urb_irq_callback(struct urb *urb) if (!yld->shutdown) { ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC); if (ret && ret != -EPERM) - dev_err(&yld->idev->dev, + dev_err(&yld->intf->dev, "%s - usb_submit_urb failed %d\n", __func__, ret); } @@ -466,7 +467,7 @@ static void urb_ctl_callback(struct urb *urb) int ret = 0, status = urb->status; if (status) - dev_err(&yld->idev->dev, "%s - urb status %d\n", + dev_err(&yld->intf->dev, "%s - urb status %d\n", __func__, status); switch (yld->ctl_data->cmd) { @@ -485,7 +486,7 @@ static void urb_ctl_callback(struct urb *urb) } if (ret && ret != -EPERM) - dev_err(&yld->idev->dev, "%s - usb_submit_urb failed %d\n", + dev_err(&yld->intf->dev, "%s - usb_submit_urb failed %d\n", __func__, ret); } @@ -518,7 +519,7 @@ static int input_open(struct input_dev *dev) struct yealink_dev *yld = input_get_drvdata(dev); int i, ret; - dev_dbg(&yld->idev->dev, "%s\n", __func__); + dev_dbg(&yld->intf->dev, "%s\n", __func__); /* force updates to device */ for (i = 0; imaster); i++) @@ -533,7 +534,7 @@ static int input_open(struct input_dev *dev) yld->ctl_data->size = 10; yld->ctl_data->sum = 0x100-CMD_INIT-10; if ((ret = usb_submit_urb(yld->urb_ctl, GFP_KERNEL)) != 0) { - dev_dbg(&yld->idev->dev, + dev_dbg(&yld->intf->dev, "%s - usb_submit_urb failed with result %d\n", __func__, ret); return ret; @@ -884,6 +885,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) return -ENOMEM; yld->udev = udev; + yld->intf = intf; yld->idev = input_dev = input_allocate_device(); if (!input_dev) -- cgit v1.2.2 From 2d744b09199d2481c99563fdcf7f1c60f87fd965 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:01 -0700 Subject: USB: input: appletouch.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Alessandro Rubini CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/appletouch.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index d0a590f87c2..38268e8ea46 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -195,6 +195,7 @@ enum atp_status_bits { struct atp { char phys[64]; struct usb_device *udev; /* usb device */ + struct usb_interface *intf; /* usb interface */ struct urb *urb; /* usb request block */ u8 *data; /* transferred data */ struct input_dev *input; /* input dev */ @@ -263,7 +264,7 @@ static int atp_geyser_init(struct atp *dev) data = kmalloc(8, GFP_KERNEL); if (!data) { - dev_err(&dev->input->dev, "Out of memory\n"); + dev_err(&dev->intf->dev, "Out of memory\n"); return -ENOMEM; } @@ -278,7 +279,7 @@ static int atp_geyser_init(struct atp *dev) for (i = 0; i < 8; i++) dprintk("appletouch[%d]: %d\n", i, data[i]); - dev_err(&dev->input->dev, "Failed to read mode from device.\n"); + dev_err(&dev->intf->dev, "Failed to read mode from device.\n"); ret = -EIO; goto out_free; } @@ -297,7 +298,7 @@ static int atp_geyser_init(struct atp *dev) for (i = 0; i < 8; i++) dprintk("appletouch[%d]: %d\n", i, data[i]); - dev_err(&dev->input->dev, "Failed to request geyser raw mode\n"); + dev_err(&dev->intf->dev, "Failed to request geyser raw mode\n"); ret = -EIO; goto out_free; } @@ -321,7 +322,7 @@ static void atp_reinit(struct work_struct *work) retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - dev_err(&dev->input->dev, + dev_err(&dev->intf->dev, "atp_reinit: usb_submit_urb failed with error %d\n", retval); } @@ -402,6 +403,7 @@ static int atp_status_check(struct urb *urb) { struct atp *dev = urb->context; struct input_dev *idev = dev->input; + struct usb_interface *intf = dev->intf; switch (urb->status) { case 0: @@ -409,7 +411,7 @@ static int atp_status_check(struct urb *urb) break; case -EOVERFLOW: if (!dev->overflow_warned) { - dev_warn(&idev->dev, + dev_warn(&intf->dev, "appletouch: OVERFLOW with data length %d, actual length is %d\n", dev->info->datalen, dev->urb->actual_length); dev->overflow_warned = true; @@ -418,13 +420,13 @@ static int atp_status_check(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* This urb is terminated, clean up */ - dev_dbg(&idev->dev, + dev_dbg(&intf->dev, "atp_complete: urb shutting down with status: %d\n", urb->status); return ATP_URB_STATUS_ERROR_FATAL; default: - dev_dbg(&idev->dev, + dev_dbg(&intf->dev, "atp_complete: nonzero urb status received: %d\n", urb->status); return ATP_URB_STATUS_ERROR; @@ -449,7 +451,7 @@ static void atp_detect_size(struct atp *dev) for (i = dev->info->xsensors; i < ATP_XSENSORS; i++) { if (dev->xy_cur[i]) { - dev_info(&dev->input->dev, + dev_info(&dev->intf->dev, "appletouch: 17\" model detected.\n"); input_set_abs_params(dev->input, ABS_X, 0, @@ -593,7 +595,7 @@ static void atp_complete_geyser_1_2(struct urb *urb) exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - dev_err(&dev->input->dev, + dev_err(&dev->intf->dev, "atp_complete: usb_submit_urb failed with result %d\n", retval); } @@ -728,7 +730,7 @@ static void atp_complete_geyser_3_4(struct urb *urb) exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); if (retval) - dev_err(&dev->input->dev, + dev_err(&dev->intf->dev, "atp_complete: usb_submit_urb failed with result %d\n", retval); } @@ -760,7 +762,7 @@ static int atp_handle_geyser(struct atp *dev) if (atp_geyser_init(dev)) return -EIO; - dev_info(&dev->input->dev, "Geyser mode initialized.\n"); + dev_info(&dev->intf->dev, "Geyser mode initialized.\n"); } return 0; @@ -803,6 +805,7 @@ static int atp_probe(struct usb_interface *iface, } dev->udev = udev; + dev->intf = iface; dev->input = input_dev; dev->info = info; dev->overflow_warned = false; @@ -891,7 +894,7 @@ static void atp_disconnect(struct usb_interface *iface) usb_free_urb(dev->urb); kfree(dev); } - printk(KERN_INFO "input: appletouch disconnected\n"); + dev_info(&iface->dev, "input: appletouch disconnected\n"); } static int atp_recover(struct atp *dev) -- cgit v1.2.2 From ab943ca8942c50b7c35c561103efb4622c5bfb85 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:02 -0700 Subject: USB: input: bcm5974.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Henrik Rydberg CC: Alessandro Rubini CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/bcm5974.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index e32928ee7cc..2cf681d98c0 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) int retval = 0, size; if (!data) { - dev_err(&dev->input->dev, "out of memory\n"); + dev_err(&dev->intf->dev, "out of memory\n"); retval = -ENOMEM; goto out; } @@ -597,7 +597,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); if (size != 8) { - dev_err(&dev->input->dev, "could not read from device\n"); + dev_err(&dev->intf->dev, "could not read from device\n"); retval = -EIO; goto out; } @@ -615,7 +615,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); if (size != 8) { - dev_err(&dev->input->dev, "could not write to device\n"); + dev_err(&dev->intf->dev, "could not write to device\n"); retval = -EIO; goto out; } @@ -631,7 +631,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) static void bcm5974_irq_button(struct urb *urb) { struct bcm5974 *dev = urb->context; - struct input_dev *idev = dev->input; + struct usb_interface *intf = dev->intf; int error; switch (urb->status) { @@ -641,11 +641,11 @@ static void bcm5974_irq_button(struct urb *urb) case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: - dev_dbg(&idev->dev, "button urb shutting down: %d\n", + dev_dbg(&intf->dev, "button urb shutting down: %d\n", urb->status); return; default: - dev_dbg(&idev->dev, "button urb status: %d\n", urb->status); + dev_dbg(&intf->dev, "button urb status: %d\n", urb->status); goto exit; } @@ -656,13 +656,13 @@ static void bcm5974_irq_button(struct urb *urb) exit: error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); if (error) - dev_err(&idev->dev, "button urb failed: %d\n", error); + dev_err(&intf->dev, "button urb failed: %d\n", error); } static void bcm5974_irq_trackpad(struct urb *urb) { struct bcm5974 *dev = urb->context; - struct input_dev *idev = dev->input; + struct usb_interface *intf = dev->intf; int error; switch (urb->status) { @@ -672,11 +672,11 @@ static void bcm5974_irq_trackpad(struct urb *urb) case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: - dev_dbg(&idev->dev, "trackpad urb shutting down: %d\n", + dev_dbg(&intf->dev, "trackpad urb shutting down: %d\n", urb->status); return; default: - dev_dbg(&idev->dev, "trackpad urb status: %d\n", urb->status); + dev_dbg(&intf->dev, "trackpad urb status: %d\n", urb->status); goto exit; } @@ -691,7 +691,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) exit: error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); if (error) - dev_err(&idev->dev, "trackpad urb failed: %d\n", error); + dev_err(&intf->dev, "trackpad urb failed: %d\n", error); } /* -- cgit v1.2.2 From 334698d435b4446d796a2059284256b9d28a0d19 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:04 -0700 Subject: USB: input: acecad.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/acecad.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index baa9d4ad0d0..e062ec899ca 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -51,6 +51,7 @@ struct usb_acecad { char name[128]; char phys[64]; struct usb_device *usbdev; + struct usb_interface *intf; struct input_dev *input; struct urb *irq; @@ -63,6 +64,7 @@ static void usb_acecad_irq(struct urb *urb) struct usb_acecad *acecad = urb->context; unsigned char *data = acecad->data; struct input_dev *dev = acecad->input; + struct usb_interface *intf = acecad->intf; int prox, status; switch (urb->status) { @@ -73,11 +75,11 @@ static void usb_acecad_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dev_dbg(&dev->dev, "%s - urb shutting down with status: %d\n", + dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n", __func__, urb->status); return; default: - dev_dbg(&dev->dev, "%s - nonzero urb status received: %d\n", + dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n", __func__, urb->status); goto resubmit; } @@ -107,7 +109,7 @@ static void usb_acecad_irq(struct urb *urb) resubmit: status = usb_submit_urb(urb, GFP_ATOMIC); if (status) - dev_err(&dev->dev, + dev_err(&intf->dev, "can't resubmit intr, %s-%s/input0, status %d\n", acecad->usbdev->bus->bus_name, acecad->usbdev->devpath, status); @@ -172,6 +174,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ } acecad->usbdev = dev; + acecad->intf = intf; acecad->input = input_dev; if (dev->manufacturer) -- cgit v1.2.2 From 871ba51c130d4f2e7d33b8c57e834df701357102 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:06 -0700 Subject: USB: input: aiptek.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov CC: Jesper Juhl CC: JJ Ding CC: Edwin van Vliet Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/aiptek.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 37dba769bf0..755a39e4c9e 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c @@ -309,6 +309,7 @@ struct aiptek_settings { struct aiptek { struct input_dev *inputdev; /* input device struct */ struct usb_device *usbdev; /* usb device struct */ + struct usb_interface *intf; /* usb interface struct */ struct urb *urb; /* urb for incoming reports */ dma_addr_t data_dma; /* our dma stuffage */ struct aiptek_features features; /* tablet's array of features */ @@ -435,6 +436,7 @@ static void aiptek_irq(struct urb *urb) struct aiptek *aiptek = urb->context; unsigned char *data = aiptek->data; struct input_dev *inputdev = aiptek->inputdev; + struct usb_interface *intf = aiptek->intf; int jitterable = 0; int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck; @@ -447,14 +449,12 @@ static void aiptek_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* This urb is terminated, clean up */ - dev_dbg(&inputdev->dev, - "%s - urb shutting down with status: %d\n", + dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n", __func__, urb->status); return; default: - dev_dbg(&inputdev->dev, - "%s - nonzero urb status received: %d\n", + dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n", __func__, urb->status); goto exit; } @@ -787,7 +787,7 @@ static void aiptek_irq(struct urb *urb) 1 | AIPTEK_REPORT_TOOL_UNKNOWN); input_sync(inputdev); } else { - dev_dbg(&inputdev->dev, "Unknown report %d\n", data[0]); + dev_dbg(&intf->dev, "Unknown report %d\n", data[0]); } /* Jitter may occur when the user presses a button on the stlyus @@ -813,7 +813,7 @@ static void aiptek_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval != 0) { - dev_err(&inputdev->dev, + dev_err(&intf->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } @@ -915,7 +915,7 @@ aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data) if ((ret = aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { - dev_dbg(&aiptek->inputdev->dev, + dev_dbg(&aiptek->intf->dev, "aiptek_program: failed, tried to send: 0x%02x 0x%02x\n", command, data); } @@ -951,7 +951,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data) if ((ret = aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { - dev_dbg(&aiptek->inputdev->dev, + dev_dbg(&aiptek->intf->dev, "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n", buf[0], buf[1], buf[2]); ret = -EIO; @@ -1731,6 +1731,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) aiptek->inputdev = inputdev; aiptek->usbdev = usbdev; + aiptek->intf = intf; aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; aiptek->inDelay = 0; aiptek->endDelay = 0; -- cgit v1.2.2 From 27c2597d455a24507f1d0be6991a0a84b5c1b035 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:09 -0700 Subject: USB: input: gtco.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/gtco.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index 422b1a2ef30..29e01ab6859 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -106,6 +106,7 @@ struct gtco { struct input_dev *inputdevice; /* input device struct pointer */ struct usb_device *usbdev; /* the usb device for this device */ + struct usb_interface *intf; /* the usb interface for this device */ struct urb *urbinfo; /* urb for incoming reports */ dma_addr_t buf_dma; /* dma addr of the data buffer*/ unsigned char * buffer; /* databuffer for reports */ @@ -200,7 +201,7 @@ struct hid_descriptor static void parse_hid_report_descriptor(struct gtco *device, char * report, int length) { - struct device *ddev = &device->inputdevice->dev; + struct device *ddev = &device->intf->dev; int x, i = 0; /* Tag primitive vars */ @@ -713,7 +714,7 @@ static void gtco_urb_callback(struct urb *urbinfo) * the rest as 0 */ val = device->buffer[5] & MASK_BUTTON; - dev_dbg(&inputdev->dev, + dev_dbg(&device->intf->dev, "======>>>>>>REPORT 1: val 0x%X(%d)\n", val, val); @@ -808,7 +809,7 @@ static void gtco_urb_callback(struct urb *urbinfo) resubmit: rc = usb_submit_urb(urbinfo, GFP_ATOMIC); if (rc != 0) - dev_err(&inputdev->dev, + dev_err(&device->intf->dev, "usb_submit_urb failed rc=0x%x\n", rc); } @@ -849,6 +850,7 @@ static int gtco_probe(struct usb_interface *usbinterface, /* Save interface information */ gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface)); + gtco->intf = usbinterface; /* Allocate some data for incoming reports */ gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE, -- cgit v1.2.2 From ed2b2f2db2d52098bdda3877367d59984febdd9f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:11 -0700 Subject: USB: input: kbtab.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/kbtab.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index a39d1761a6c..3fba74b9b60 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c @@ -33,6 +33,7 @@ struct kbtab { dma_addr_t data_dma; struct input_dev *dev; struct usb_device *usbdev; + struct usb_interface *intf; struct urb *irq; char phys[32]; }; @@ -53,11 +54,13 @@ static void kbtab_irq(struct urb *urb) case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ - dev_dbg(&dev->dev, "%s - urb shutting down with status: %d\n", + dev_dbg(&kbtab->intf->dev, + "%s - urb shutting down with status: %d\n", __func__, urb->status); return; default: - dev_dbg(&dev->dev, "%s - nonzero urb status received: %d\n", + dev_dbg(&kbtab->intf->dev, + "%s - nonzero urb status received: %d\n", __func__, urb->status); goto exit; } @@ -82,7 +85,7 @@ static void kbtab_irq(struct urb *urb) exit: retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&dev->dev, + dev_err(&kbtab->intf->dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval); } @@ -134,6 +137,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i goto fail2; kbtab->usbdev = dev; + kbtab->intf = intf; kbtab->dev = input_dev; usb_make_path(dev, kbtab->phys, sizeof(kbtab->phys)); -- cgit v1.2.2 From 65e78a2062d5e56f906d52c45820d08711d2c2e2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:13 -0700 Subject: USB: input: wacom_sys.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov CC: Ping Cheng CC: Chris Bagwell CC: Eduard Hasenleithner Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/wacom_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index ac29a68ac53..79a0509882d 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -99,7 +99,7 @@ static int wacom_set_report(struct usb_interface *intf, u8 type, u8 id, static void wacom_sys_irq(struct urb *urb) { struct wacom *wacom = urb->context; - struct device *dev = &wacom->wacom_wac.input->dev; + struct device *dev = &wacom->intf->dev; int retval; switch (urb->status) { @@ -820,7 +820,7 @@ static int wacom_initialize_leds(struct wacom *wacom) } if (error) { - dev_err(&wacom->wacom_wac.input->dev, + dev_err(&wacom->intf->dev, "cannot create sysfs group err: %d\n", error); return error; } -- cgit v1.2.2 From 0a5ebc88c74d8029e80a72e57cbebc0b3b4e5d98 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:16 -0700 Subject: USB: input: usbtouchscreen.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov CC: Henrik Rydberg CC: Rusty Russell CC: Viresh Kumar CC: Armando Visconti Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/usbtouchscreen.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'drivers/input') diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 100eded96b0..e32709e0dd6 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -269,7 +269,7 @@ static int e2i_init(struct usbtouch_usb *usbtouch) 0x01, 0x02, 0x0000, 0x0081, NULL, 0, USB_CTRL_SET_TIMEOUT); - dev_dbg(&usbtouch->input->dev, + dev_dbg(&usbtouch->interface->dev, "%s - usb_control_msg - E2I_RESET - bytes|err: %d\n", __func__, ret); return ret; @@ -426,7 +426,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) MTOUCHUSB_RESET, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT); - dev_dbg(&usbtouch->input->dev, + dev_dbg(&usbtouch->interface->dev, "%s - usb_control_msg - MTOUCHUSB_RESET - bytes|err: %d\n", __func__, ret); if (ret < 0) @@ -438,7 +438,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) MTOUCHUSB_ASYNC_REPORT, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 1, 1, NULL, 0, USB_CTRL_SET_TIMEOUT); - dev_dbg(&usbtouch->input->dev, + dev_dbg(&usbtouch->interface->dev, "%s - usb_control_msg - MTOUCHUSB_ASYNC_REPORT - bytes|err: %d\n", __func__, ret); if (ret >= 0) @@ -740,29 +740,29 @@ static int jastec_read_data(struct usbtouch_usb *dev, unsigned char *pkt) #ifdef CONFIG_TOUCHSCREEN_USB_ZYTRONIC static int zytronic_read_data(struct usbtouch_usb *dev, unsigned char *pkt) { - struct input_dev *input = dev->input; + struct usb_interface *intf = dev->interface; switch (pkt[0]) { case 0x3A: /* command response */ - dev_dbg(&input->dev, "%s: Command response %d\n", __func__, pkt[1]); + dev_dbg(&intf->dev, "%s: Command response %d\n", __func__, pkt[1]); break; case 0xC0: /* down */ dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); dev->touch = 1; - dev_dbg(&input->dev, "%s: down %d,%d\n", __func__, dev->x, dev->y); + dev_dbg(&intf->dev, "%s: down %d,%d\n", __func__, dev->x, dev->y); return 1; case 0x80: /* up */ dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7); dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7); dev->touch = 0; - dev_dbg(&input->dev, "%s: up %d,%d\n", __func__, dev->x, dev->y); + dev_dbg(&intf->dev, "%s: up %d,%d\n", __func__, dev->x, dev->y); return 1; default: - dev_dbg(&input->dev, "%s: Unknown return %d\n", __func__, pkt[0]); + dev_dbg(&intf->dev, "%s: Unknown return %d\n", __func__, pkt[0]); break; } @@ -817,7 +817,7 @@ static int nexio_alloc(struct usbtouch_usb *usbtouch) priv->ack = usb_alloc_urb(0, GFP_KERNEL); if (!priv->ack) { - dev_dbg(&usbtouch->input->dev, + dev_dbg(&usbtouch->interface->dev, "%s - usb_alloc_urb failed: usbtouch->ack\n", __func__); goto err_ack_buf; } @@ -1355,7 +1355,7 @@ out_flush_buf: static void usbtouch_irq(struct urb *urb) { struct usbtouch_usb *usbtouch = urb->context; - struct device *dev = &usbtouch->input->dev; + struct device *dev = &usbtouch->interface->dev; int retval; switch (urb->status) { @@ -1388,8 +1388,7 @@ exit: usb_mark_last_busy(interface_to_usbdev(usbtouch->interface)); retval = usb_submit_urb(urb, GFP_ATOMIC); if (retval) - dev_err(&usbtouch->input->dev, - "%s - usb_submit_urb failed with result: %d\n", + dev_err(dev, "%s - usb_submit_urb failed with result: %d\n", __func__, retval); } @@ -1465,7 +1464,7 @@ static int usbtouch_reset_resume(struct usb_interface *intf) if (usbtouch->type->init) { err = usbtouch->type->init(usbtouch); if (err) { - dev_dbg(&input->dev, + dev_dbg(&intf->dev, "%s - type->init() failed, err: %d\n", __func__, err); return err; @@ -1639,7 +1638,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(&input_dev->dev, + dev_err(&intf->dev, "%s - usb_submit_urb failed with result: %d\n", __func__, err); goto out_unregister_input; @@ -1671,7 +1670,7 @@ static void usbtouch_disconnect(struct usb_interface *intf) if (!usbtouch) return; - dev_dbg(&usbtouch->input->dev, + dev_dbg(&intf->dev, "%s - usbtouch is initialized, cleaning up\n", __func__); usb_set_intfdata(intf, NULL); -- cgit v1.2.2 From 3b923993daaa38f1ae297a79f734c308866dd026 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:35:56 -0700 Subject: USB: input: appletouch: fix up compiler warning My last patch fixing up the dev_* messages caused a compiler warning accidentally for an unused variable. Fix this up, as it was my fault. Cc: Alessandro Rubini Cc: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/appletouch.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/input') diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 38268e8ea46..e42f1fa8cdc 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -402,7 +402,6 @@ static inline void atp_report_fingers(struct input_dev *input, int fingers) static int atp_status_check(struct urb *urb) { struct atp *dev = urb->context; - struct input_dev *idev = dev->input; struct usb_interface *intf = dev->intf; switch (urb->status) { -- cgit v1.2.2