diff options
Diffstat (limited to 'drivers/input/misc/powermate.c')
-rw-r--r-- | drivers/input/misc/powermate.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 538f7049ec64..49c0c3ebd321 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c | |||
@@ -65,6 +65,7 @@ struct powermate_device { | |||
65 | struct urb *irq, *config; | 65 | struct urb *irq, *config; |
66 | struct usb_ctrlrequest *configcr; | 66 | struct usb_ctrlrequest *configcr; |
67 | struct usb_device *udev; | 67 | struct usb_device *udev; |
68 | struct usb_interface *intf; | ||
68 | struct input_dev *input; | 69 | struct input_dev *input; |
69 | spinlock_t lock; | 70 | spinlock_t lock; |
70 | int static_brightness; | 71 | int static_brightness; |
@@ -85,6 +86,7 @@ static void powermate_config_complete(struct urb *urb); | |||
85 | static void powermate_irq(struct urb *urb) | 86 | static void powermate_irq(struct urb *urb) |
86 | { | 87 | { |
87 | struct powermate_device *pm = urb->context; | 88 | struct powermate_device *pm = urb->context; |
89 | struct device *dev = &pm->intf->dev; | ||
88 | int retval; | 90 | int retval; |
89 | 91 | ||
90 | switch (urb->status) { | 92 | switch (urb->status) { |
@@ -95,10 +97,12 @@ static void powermate_irq(struct urb *urb) | |||
95 | case -ENOENT: | 97 | case -ENOENT: |
96 | case -ESHUTDOWN: | 98 | case -ESHUTDOWN: |
97 | /* this urb is terminated, clean up */ | 99 | /* this urb is terminated, clean up */ |
98 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); | 100 | dev_dbg(dev, "%s - urb shutting down with status: %d\n", |
101 | __func__, urb->status); | ||
99 | return; | 102 | return; |
100 | default: | 103 | default: |
101 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); | 104 | dev_dbg(dev, "%s - nonzero urb status received: %d\n", |
105 | __func__, urb->status); | ||
102 | goto exit; | 106 | goto exit; |
103 | } | 107 | } |
104 | 108 | ||
@@ -110,8 +114,8 @@ static void powermate_irq(struct urb *urb) | |||
110 | exit: | 114 | exit: |
111 | retval = usb_submit_urb (urb, GFP_ATOMIC); | 115 | retval = usb_submit_urb (urb, GFP_ATOMIC); |
112 | if (retval) | 116 | if (retval) |
113 | err ("%s - usb_submit_urb failed with result %d", | 117 | dev_err(dev, "%s - usb_submit_urb failed with result: %d\n", |
114 | __func__, retval); | 118 | __func__, retval); |
115 | } | 119 | } |
116 | 120 | ||
117 | /* Decide if we need to issue a control message and do so. Must be called with pm->lock taken */ | 121 | /* Decide if we need to issue a control message and do so. Must be called with pm->lock taken */ |
@@ -330,6 +334,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i | |||
330 | goto fail3; | 334 | goto fail3; |
331 | 335 | ||
332 | pm->udev = udev; | 336 | pm->udev = udev; |
337 | pm->intf = intf; | ||
333 | pm->input = input_dev; | 338 | pm->input = input_dev; |
334 | 339 | ||
335 | usb_make_path(udev, pm->phys, sizeof(pm->phys)); | 340 | usb_make_path(udev, pm->phys, sizeof(pm->phys)); |