aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/keyspan_remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/misc/keyspan_remote.c')
-rw-r--r--drivers/input/misc/keyspan_remote.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c
index d99151a8bf1..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)
157 * though so it's not too big a deal 157 * though so it's not too big a deal
158 */ 158 */
159 if (dev->data.pos >= dev->data.len) { 159 if (dev->data.pos >= dev->data.len) {
160 dev_dbg(&dev->udev->dev, 160 dev_dbg(&dev->interface->dev,
161 "%s - Error ran out of data. pos: %d, len: %d\n", 161 "%s - Error ran out of data. pos: %d, len: %d\n",
162 __func__, dev->data.pos, dev->data.len); 162 __func__, dev->data.pos, dev->data.len);
163 return -1; 163 return -1;
@@ -267,7 +267,9 @@ static void keyspan_check_data(struct usb_keyspan *remote)
267 remote->data.tester = remote->data.tester >> 6; 267 remote->data.tester = remote->data.tester >> 6;
268 remote->data.bits_left -= 6; 268 remote->data.bits_left -= 6;
269 } else { 269 } else {
270 err("%s - Unknown sequence found in system data.\n", __func__); 270 dev_err(&remote->interface->dev,
271 "%s - Unknown sequence found in system data.\n",
272 __func__);
271 remote->stage = 0; 273 remote->stage = 0;
272 return; 274 return;
273 } 275 }
@@ -286,7 +288,9 @@ static void keyspan_check_data(struct usb_keyspan *remote)
286 remote->data.tester = remote->data.tester >> 6; 288 remote->data.tester = remote->data.tester >> 6;
287 remote->data.bits_left -= 6; 289 remote->data.bits_left -= 6;
288 } else { 290 } else {
289 err("%s - Unknown sequence found in button data.\n", __func__); 291 dev_err(&remote->interface->dev,
292 "%s - Unknown sequence found in button data.\n",
293 __func__);
290 remote->stage = 0; 294 remote->stage = 0;
291 return; 295 return;
292 } 296 }
@@ -302,7 +306,9 @@ static void keyspan_check_data(struct usb_keyspan *remote)
302 remote->data.tester = remote->data.tester >> 6; 306 remote->data.tester = remote->data.tester >> 6;
303 remote->data.bits_left -= 6; 307 remote->data.bits_left -= 6;
304 } else { 308 } else {
305 err("%s - Error in message, invalid toggle.\n", __func__); 309 dev_err(&remote->interface->dev,
310 "%s - Error in message, invalid toggle.\n",
311 __func__);
306 remote->stage = 0; 312 remote->stage = 0;
307 return; 313 return;
308 } 314 }
@@ -312,10 +318,11 @@ static void keyspan_check_data(struct usb_keyspan *remote)
312 remote->data.tester = remote->data.tester >> 5; 318 remote->data.tester = remote->data.tester >> 5;
313 remote->data.bits_left -= 5; 319 remote->data.bits_left -= 5;
314 } else { 320 } else {
315 err("Bad message received, no stop bit found.\n"); 321 dev_err(&remote->interface->dev,
322 "Bad message received, no stop bit found.\n");
316 } 323 }
317 324
318 dev_dbg(&remote->udev->dev, 325 dev_dbg(&remote->interface->dev,
319 "%s found valid message: system: %d, button: %d, toggle: %d\n", 326 "%s found valid message: system: %d, button: %d, toggle: %d\n",
320 __func__, message.system, message.button, message.toggle); 327 __func__, message.system, message.button, message.toggle);
321 328
@@ -397,7 +404,9 @@ static void keyspan_irq_recv(struct urb *urb)
397resubmit: 404resubmit:
398 retval = usb_submit_urb(urb, GFP_ATOMIC); 405 retval = usb_submit_urb(urb, GFP_ATOMIC);
399 if (retval) 406 if (retval)
400 err ("%s - usb_submit_urb failed with result: %d", __func__, retval); 407 dev_err(&dev->interface->dev,
408 "%s - usb_submit_urb failed with result: %d\n",
409 __func__, retval);
401} 410}
402 411
403static int keyspan_open(struct input_dev *dev) 412static int keyspan_open(struct input_dev *dev)