diff options
Diffstat (limited to 'drivers/hid/hid-magicmouse.c')
-rw-r--r-- | drivers/hid/hid-magicmouse.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index e6dc15171664..11306b3d9c56 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
@@ -12,6 +12,8 @@ | |||
12 | * any later version. | 12 | * any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
16 | |||
15 | #include <linux/device.h> | 17 | #include <linux/device.h> |
16 | #include <linux/hid.h> | 18 | #include <linux/hid.h> |
17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
@@ -446,7 +448,7 @@ static int magicmouse_probe(struct hid_device *hdev, | |||
446 | 448 | ||
447 | msc = kzalloc(sizeof(*msc), GFP_KERNEL); | 449 | msc = kzalloc(sizeof(*msc), GFP_KERNEL); |
448 | if (msc == NULL) { | 450 | if (msc == NULL) { |
449 | dev_err(&hdev->dev, "can't alloc magicmouse descriptor\n"); | 451 | hid_err(hdev, "can't alloc magicmouse descriptor\n"); |
450 | return -ENOMEM; | 452 | return -ENOMEM; |
451 | } | 453 | } |
452 | 454 | ||
@@ -459,13 +461,13 @@ static int magicmouse_probe(struct hid_device *hdev, | |||
459 | 461 | ||
460 | ret = hid_parse(hdev); | 462 | ret = hid_parse(hdev); |
461 | if (ret) { | 463 | if (ret) { |
462 | dev_err(&hdev->dev, "magicmouse hid parse failed\n"); | 464 | hid_err(hdev, "magicmouse hid parse failed\n"); |
463 | goto err_free; | 465 | goto err_free; |
464 | } | 466 | } |
465 | 467 | ||
466 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | 468 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); |
467 | if (ret) { | 469 | if (ret) { |
468 | dev_err(&hdev->dev, "magicmouse hw start failed\n"); | 470 | hid_err(hdev, "magicmouse hw start failed\n"); |
469 | goto err_free; | 471 | goto err_free; |
470 | } | 472 | } |
471 | 473 | ||
@@ -486,7 +488,7 @@ static int magicmouse_probe(struct hid_device *hdev, | |||
486 | } | 488 | } |
487 | 489 | ||
488 | if (!report) { | 490 | if (!report) { |
489 | dev_err(&hdev->dev, "unable to register touch report\n"); | 491 | hid_err(hdev, "unable to register touch report\n"); |
490 | ret = -ENOMEM; | 492 | ret = -ENOMEM; |
491 | goto err_stop_hw; | 493 | goto err_stop_hw; |
492 | } | 494 | } |
@@ -495,8 +497,7 @@ static int magicmouse_probe(struct hid_device *hdev, | |||
495 | ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature), | 497 | ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature), |
496 | HID_FEATURE_REPORT); | 498 | HID_FEATURE_REPORT); |
497 | if (ret != sizeof(feature)) { | 499 | if (ret != sizeof(feature)) { |
498 | dev_err(&hdev->dev, "unable to request touch data (%d)\n", | 500 | hid_err(hdev, "unable to request touch data (%d)\n", ret); |
499 | ret); | ||
500 | goto err_stop_hw; | 501 | goto err_stop_hw; |
501 | } | 502 | } |
502 | 503 | ||
@@ -540,7 +541,7 @@ static int __init magicmouse_init(void) | |||
540 | 541 | ||
541 | ret = hid_register_driver(&magicmouse_driver); | 542 | ret = hid_register_driver(&magicmouse_driver); |
542 | if (ret) | 543 | if (ret) |
543 | printk(KERN_ERR "can't register magicmouse driver\n"); | 544 | pr_err("can't register magicmouse driver\n"); |
544 | 545 | ||
545 | return ret; | 546 | return ret; |
546 | } | 547 | } |