aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-pyra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-roccat-pyra.c')
-rw-r--r--drivers/hid/hid-roccat-pyra.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c
index 9bf23047892a..e7b4affe2664 100644
--- a/drivers/hid/hid-roccat-pyra.c
+++ b/drivers/hid/hid-roccat-pyra.c
@@ -87,9 +87,8 @@ static int pyra_receive_control_status(struct usb_device *usb_dev)
87 control.value == 1) 87 control.value == 1)
88 return 0; 88 return 0;
89 else { 89 else {
90 dev_err(&usb_dev->dev, "receive control status: " 90 hid_err(usb_dev, "receive control status: unknown response 0x%x 0x%x\n",
91 "unknown response 0x%x 0x%x\n", 91 control.request, control.value);
92 control.request, control.value);
93 return -EINVAL; 92 return -EINVAL;
94 } 93 }
95} 94}
@@ -770,21 +769,20 @@ static int pyra_init_specials(struct hid_device *hdev)
770 769
771 pyra = kzalloc(sizeof(*pyra), GFP_KERNEL); 770 pyra = kzalloc(sizeof(*pyra), GFP_KERNEL);
772 if (!pyra) { 771 if (!pyra) {
773 dev_err(&hdev->dev, "can't alloc device descriptor\n"); 772 hid_err(hdev, "can't alloc device descriptor\n");
774 return -ENOMEM; 773 return -ENOMEM;
775 } 774 }
776 hid_set_drvdata(hdev, pyra); 775 hid_set_drvdata(hdev, pyra);
777 776
778 retval = pyra_init_pyra_device_struct(usb_dev, pyra); 777 retval = pyra_init_pyra_device_struct(usb_dev, pyra);
779 if (retval) { 778 if (retval) {
780 dev_err(&hdev->dev, 779 hid_err(hdev, "couldn't init struct pyra_device\n");
781 "couldn't init struct pyra_device\n");
782 goto exit_free; 780 goto exit_free;
783 } 781 }
784 782
785 retval = roccat_connect(hdev); 783 retval = roccat_connect(hdev);
786 if (retval < 0) { 784 if (retval < 0) {
787 dev_err(&hdev->dev, "couldn't init char dev\n"); 785 hid_err(hdev, "couldn't init char dev\n");
788 } else { 786 } else {
789 pyra->chrdev_minor = retval; 787 pyra->chrdev_minor = retval;
790 pyra->roccat_claimed = 1; 788 pyra->roccat_claimed = 1;
@@ -792,7 +790,7 @@ static int pyra_init_specials(struct hid_device *hdev)
792 790
793 retval = pyra_create_sysfs_attributes(intf); 791 retval = pyra_create_sysfs_attributes(intf);
794 if (retval) { 792 if (retval) {
795 dev_err(&hdev->dev, "cannot create sysfs files\n"); 793 hid_err(hdev, "cannot create sysfs files\n");
796 goto exit_free; 794 goto exit_free;
797 } 795 }
798 } else { 796 } else {
@@ -826,19 +824,19 @@ static int pyra_probe(struct hid_device *hdev, const struct hid_device_id *id)
826 824
827 retval = hid_parse(hdev); 825 retval = hid_parse(hdev);
828 if (retval) { 826 if (retval) {
829 dev_err(&hdev->dev, "parse failed\n"); 827 hid_err(hdev, "parse failed\n");
830 goto exit; 828 goto exit;
831 } 829 }
832 830
833 retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT); 831 retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
834 if (retval) { 832 if (retval) {
835 dev_err(&hdev->dev, "hw start failed\n"); 833 hid_err(hdev, "hw start failed\n");
836 goto exit; 834 goto exit;
837 } 835 }
838 836
839 retval = pyra_init_specials(hdev); 837 retval = pyra_init_specials(hdev);
840 if (retval) { 838 if (retval) {
841 dev_err(&hdev->dev, "couldn't install mouse\n"); 839 hid_err(hdev, "couldn't install mouse\n");
842 goto exit_stop; 840 goto exit_stop;
843 } 841 }
844 return 0; 842 return 0;