diff options
Diffstat (limited to 'drivers/hid/hid-sjoy.c')
-rw-r--r-- | drivers/hid/hid-sjoy.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/hid/hid-sjoy.c b/drivers/hid/hid-sjoy.c index e10a7687ebf2..16f7cafc9695 100644 --- a/drivers/hid/hid-sjoy.c +++ b/drivers/hid/hid-sjoy.c | |||
@@ -74,26 +74,25 @@ static int sjoyff_init(struct hid_device *hid) | |||
74 | int error; | 74 | int error; |
75 | 75 | ||
76 | if (list_empty(report_list)) { | 76 | if (list_empty(report_list)) { |
77 | dev_err(&hid->dev, "no output reports found\n"); | 77 | hid_err(hid, "no output reports found\n"); |
78 | return -ENODEV; | 78 | return -ENODEV; |
79 | } | 79 | } |
80 | 80 | ||
81 | report_ptr = report_ptr->next; | 81 | report_ptr = report_ptr->next; |
82 | 82 | ||
83 | if (report_ptr == report_list) { | 83 | if (report_ptr == report_list) { |
84 | dev_err(&hid->dev, "required output report is " | 84 | hid_err(hid, "required output report is missing\n"); |
85 | "missing\n"); | ||
86 | return -ENODEV; | 85 | return -ENODEV; |
87 | } | 86 | } |
88 | 87 | ||
89 | report = list_entry(report_ptr, struct hid_report, list); | 88 | report = list_entry(report_ptr, struct hid_report, list); |
90 | if (report->maxfield < 1) { | 89 | if (report->maxfield < 1) { |
91 | dev_err(&hid->dev, "no fields in the report\n"); | 90 | hid_err(hid, "no fields in the report\n"); |
92 | return -ENODEV; | 91 | return -ENODEV; |
93 | } | 92 | } |
94 | 93 | ||
95 | if (report->field[0]->report_count < 3) { | 94 | if (report->field[0]->report_count < 3) { |
96 | dev_err(&hid->dev, "not enough values in the field\n"); | 95 | hid_err(hid, "not enough values in the field\n"); |
97 | return -ENODEV; | 96 | return -ENODEV; |
98 | } | 97 | } |
99 | 98 | ||
@@ -117,8 +116,7 @@ static int sjoyff_init(struct hid_device *hid) | |||
117 | sjoyff->report->field[0]->value[2] = 0x00; | 116 | sjoyff->report->field[0]->value[2] = 0x00; |
118 | usbhid_submit_report(hid, sjoyff->report, USB_DIR_OUT); | 117 | usbhid_submit_report(hid, sjoyff->report, USB_DIR_OUT); |
119 | 118 | ||
120 | dev_info(&hid->dev, | 119 | hid_info(hid, "Force feedback for SmartJoy PLUS PS2/USB adapter\n"); |
121 | "Force feedback for SmartJoy PLUS PS2/USB adapter\n"); | ||
122 | 120 | ||
123 | return 0; | 121 | return 0; |
124 | } | 122 | } |
@@ -135,13 +133,13 @@ static int sjoy_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
135 | 133 | ||
136 | ret = hid_parse(hdev); | 134 | ret = hid_parse(hdev); |
137 | if (ret) { | 135 | if (ret) { |
138 | dev_err(&hdev->dev, "parse failed\n"); | 136 | hid_err(hdev, "parse failed\n"); |
139 | goto err; | 137 | goto err; |
140 | } | 138 | } |
141 | 139 | ||
142 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); | 140 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); |
143 | if (ret) { | 141 | if (ret) { |
144 | dev_err(&hdev->dev, "hw start failed\n"); | 142 | hid_err(hdev, "hw start failed\n"); |
145 | goto err; | 143 | goto err; |
146 | } | 144 | } |
147 | 145 | ||