diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 15:50:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 15:50:46 -0700 |
commit | a481991467d38afb43c3921d5b5b59ccb61b04ba (patch) | |
tree | a4b0b9a14da6fd5ef7b9b512bb32dbfcfcf2cd71 /drivers/input/misc/yealink.c | |
parent | f6a26ae7699416d86bea8cb68ce413571e9cab3c (diff) | |
parent | cda4db53e9c28061c100400e1a4d273ea61dfba9 (diff) |
Merge tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB 3.5-rc1 changes from Greg Kroah-Hartman:
"Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window.
It's touches a lot of different parts of the kernel, all USB drivers,
due to some API cleanups (getting rid of the ancient err() macro) and
some changes that are needed for USB 3.0 power management updates.
There are also lots of new drivers, pimarily gadget, but others as
well. We deleted a staging driver, which was nice, and finally
dropped the obsolete usbfs code, which will make Al happy to never
have to touch that again.
There were some build errors in the tree that linux-next found a few
days ago, but those were fixed by the most recent changes (all were
due to us not building with CONFIG_PM disabled.)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits)
xhci: Fix DIV_ROUND_UP compile error.
xhci: Fix compile with CONFIG_USB_SUSPEND=n
USB: Fix core compile with CONFIG_USB_SUSPEND=n
brcm80211: Fix compile error for .disable_hub_initiated_lpm.
Revert "USB: EHCI: work around bug in the Philips ISP1562 controller"
MAINTAINERS: Add myself as maintainer to the USB PHY Layer
USB: EHCI: fix command register configuration lost problem
USB: Remove races in devio.c
USB: ehci-platform: remove update_device
USB: Disable hub-initiated LPM for comms devices.
xhci: Add Intel U1/U2 timeout policy.
xhci: Add infrastructure for host-specific LPM policies.
USB: Add macros for interrupt endpoint types.
xhci: Reserve one command for USB3 LPM disable.
xhci: Some Evaluate Context commands must succeed.
USB: Disable USB 3.0 LPM in critical sections.
USB: Add support to enable/disable USB3 link states.
USB: Allow drivers to disable hub-initiated LPM.
USB: Calculate USB 3.0 exit latencies for LPM.
USB: Refactor code to set LPM support flag.
...
Conflicts:
arch/arm/mach-exynos/mach-nuri.c
arch/arm/mach-exynos/mach-universal_c210.c
drivers/net/wireless/ath/ath6kl/usb.c
Diffstat (limited to 'drivers/input/misc/yealink.c')
-rw-r--r-- | drivers/input/misc/yealink.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index f4776e7f8c1..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,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->intf->dev, "%s - urb status %d\n", + __func__, status); switch (yld->irq_data->cmd) { case CMD_KEYPRESS: @@ -437,13 +439,15 @@ static void urb_irq_callback(struct urb *urb) break; case CMD_SCANCODE: - dbg("get scancode %x", yld->irq_data->data[0]); + 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: - err("unexpected response %x", yld->irq_data->cmd); + dev_err(&yld->intf->dev, "unexpected response %x\n", + yld->irq_data->cmd); } yealink_do_idle_tasks(yld); @@ -451,7 +455,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->intf->dev, + "%s - usb_submit_urb failed %d\n", + __func__, ret); } } @@ -461,7 +467,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->intf->dev, "%s - urb status %d\n", + __func__, status); switch (yld->ctl_data->cmd) { case CMD_KEYPRESS: @@ -479,7 +486,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->intf->dev, "%s - usb_submit_urb failed %d\n", + __func__, ret); } /******************************************************************************* @@ -511,7 +519,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->intf->dev, "%s\n", __func__); /* force updates to device */ for (i = 0; i<sizeof(yld->master); i++) @@ -526,8 +534,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->intf->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, ret); return ret; } return 0; @@ -876,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) @@ -909,7 +919,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, |