diff options
Diffstat (limited to 'drivers/hid/hid-prodikeys.c')
-rw-r--r-- | drivers/hid/hid-prodikeys.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index 5f0fa6c1bf87..ab19f2905d27 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c | |||
@@ -16,6 +16,8 @@ | |||
16 | * any later version. | 16 | * any later version. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
20 | |||
19 | #include <linux/device.h> | 21 | #include <linux/device.h> |
20 | #include <linux/module.h> | 22 | #include <linux/module.h> |
21 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
@@ -285,11 +287,11 @@ static int pcmidi_get_output_report(struct pcmidi_snd *pm) | |||
285 | continue; | 287 | continue; |
286 | 288 | ||
287 | if (report->maxfield < 1) { | 289 | if (report->maxfield < 1) { |
288 | dev_err(&hdev->dev, "output report is empty\n"); | 290 | hid_err(hdev, "output report is empty\n"); |
289 | break; | 291 | break; |
290 | } | 292 | } |
291 | if (report->field[0]->report_count != 2) { | 293 | if (report->field[0]->report_count != 2) { |
292 | dev_err(&hdev->dev, "field count too low\n"); | 294 | hid_err(hdev, "field count too low\n"); |
293 | break; | 295 | break; |
294 | } | 296 | } |
295 | pm->pcmidi_report6 = report; | 297 | pm->pcmidi_report6 = report; |
@@ -746,8 +748,8 @@ static __u8 *pk_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
746 | if (*rsize == 178 && | 748 | if (*rsize == 178 && |
747 | rdesc[111] == 0x06 && rdesc[112] == 0x00 && | 749 | rdesc[111] == 0x06 && rdesc[112] == 0x00 && |
748 | rdesc[113] == 0xff) { | 750 | rdesc[113] == 0xff) { |
749 | dev_info(&hdev->dev, "fixing up pc-midi keyboard report " | 751 | hid_info(hdev, |
750 | "descriptor\n"); | 752 | "fixing up pc-midi keyboard report descriptor\n"); |
751 | 753 | ||
752 | rdesc[144] = 0x18; /* report 4: was 0x10 report count */ | 754 | rdesc[144] = 0x18; /* report 4: was 0x10 report count */ |
753 | } | 755 | } |
@@ -805,7 +807,7 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
805 | 807 | ||
806 | pk = kzalloc(sizeof(*pk), GFP_KERNEL); | 808 | pk = kzalloc(sizeof(*pk), GFP_KERNEL); |
807 | if (pk == NULL) { | 809 | if (pk == NULL) { |
808 | dev_err(&hdev->dev, "prodikeys: can't alloc descriptor\n"); | 810 | hid_err(hdev, "can't alloc descriptor\n"); |
809 | return -ENOMEM; | 811 | return -ENOMEM; |
810 | } | 812 | } |
811 | 813 | ||
@@ -813,8 +815,7 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
813 | 815 | ||
814 | pm = kzalloc(sizeof(*pm), GFP_KERNEL); | 816 | pm = kzalloc(sizeof(*pm), GFP_KERNEL); |
815 | if (pm == NULL) { | 817 | if (pm == NULL) { |
816 | dev_err(&hdev->dev, | 818 | hid_err(hdev, "can't alloc descriptor\n"); |
817 | "prodikeys: can't alloc descriptor\n"); | ||
818 | ret = -ENOMEM; | 819 | ret = -ENOMEM; |
819 | goto err_free; | 820 | goto err_free; |
820 | } | 821 | } |
@@ -827,7 +828,7 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
827 | 828 | ||
828 | ret = hid_parse(hdev); | 829 | ret = hid_parse(hdev); |
829 | if (ret) { | 830 | if (ret) { |
830 | dev_err(&hdev->dev, "prodikeys: hid parse failed\n"); | 831 | hid_err(hdev, "hid parse failed\n"); |
831 | goto err_free; | 832 | goto err_free; |
832 | } | 833 | } |
833 | 834 | ||
@@ -837,7 +838,7 @@ static int pk_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
837 | 838 | ||
838 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | 839 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); |
839 | if (ret) { | 840 | if (ret) { |
840 | dev_err(&hdev->dev, "prodikeys: hw start failed\n"); | 841 | hid_err(hdev, "hw start failed\n"); |
841 | goto err_free; | 842 | goto err_free; |
842 | } | 843 | } |
843 | 844 | ||
@@ -896,7 +897,7 @@ static int pk_init(void) | |||
896 | 897 | ||
897 | ret = hid_register_driver(&pk_driver); | 898 | ret = hid_register_driver(&pk_driver); |
898 | if (ret) | 899 | if (ret) |
899 | printk(KERN_ERR "can't register prodikeys driver\n"); | 900 | pr_err("can't register prodikeys driver\n"); |
900 | 901 | ||
901 | return ret; | 902 | return ret; |
902 | } | 903 | } |