aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-tmff.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-09-18 06:23:34 -0400
committerJiri Kosina <jkosina@suse.cz>2008-10-14 17:51:01 -0400
commit795750197f240ca2a3f064c0210c4efd40dbaed3 (patch)
tree05c40a4331091817e73710ddf34fcc3a3ab5a2c6 /drivers/hid/hid-tmff.c
parent76483cf4d0efbc35eaf9905a437f2f1be0221360 (diff)
HID: convert to dev_* prints
Since we have a real device bound to a driver, we may use struct device for printing. Use dev_* functions instead of printks in 4 drivers. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-tmff.c')
-rw-r--r--drivers/hid/hid-tmff.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c
index be7ebe286a16..1b7cba0f7e1f 100644
--- a/drivers/hid/hid-tmff.c
+++ b/drivers/hid/hid-tmff.c
@@ -149,27 +149,28 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
149 switch (field->usage[0].hid) { 149 switch (field->usage[0].hid) {
150 case THRUSTMASTER_USAGE_FF: 150 case THRUSTMASTER_USAGE_FF:
151 if (field->report_count < 2) { 151 if (field->report_count < 2) {
152 warn("ignoring FF field with " 152 dev_warn(&hid->dev, "ignoring FF field "
153 "report_count < 2"); 153 "with report_count < 2\n");
154 continue; 154 continue;
155 } 155 }
156 156
157 if (field->logical_maximum == 157 if (field->logical_maximum ==
158 field->logical_minimum) { 158 field->logical_minimum) {
159 warn("ignoring FF field with " 159 dev_warn(&hid->dev, "ignoring FF field "
160 "logical_maximum == " 160 "with logical_maximum "
161 "logical_minimum"); 161 "== logical_minimum\n");
162 continue; 162 continue;
163 } 163 }
164 164
165 if (tmff->report && tmff->report != report) { 165 if (tmff->report && tmff->report != report) {
166 warn("ignoring FF field in other " 166 dev_warn(&hid->dev, "ignoring FF field "
167 "report"); 167 "in other report\n");
168 continue; 168 continue;
169 } 169 }
170 170
171 if (tmff->ff_field && tmff->ff_field != field) { 171 if (tmff->ff_field && tmff->ff_field != field) {
172 warn("ignoring duplicate FF field"); 172 dev_warn(&hid->dev, "ignoring "
173 "duplicate FF field\n");
173 continue; 174 continue;
174 } 175 }
175 176
@@ -182,7 +183,8 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
182 break; 183 break;
183 184
184 default: 185 default:
185 warn("ignoring unknown output usage %08x", 186 dev_warn(&hid->dev, "ignoring unknown output "
187 "usage %08x\n",
186 field->usage[0].hid); 188 field->usage[0].hid);
187 continue; 189 continue;
188 } 190 }
@@ -190,7 +192,7 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
190 } 192 }
191 193
192 if (!tmff->report) { 194 if (!tmff->report) {
193 err("cant find FF field in output reports\n"); 195 dev_err(&hid->dev, "can't find FF field in output reports\n");
194 error = -ENODEV; 196 error = -ENODEV;
195 goto fail; 197 goto fail;
196 } 198 }
@@ -199,8 +201,8 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
199 if (error) 201 if (error)
200 goto fail; 202 goto fail;
201 203
202 info("Force feedback for ThrustMaster devices by Zinx Verituse " 204 dev_info(&hid->dev, "force feedback for ThrustMaster devices by Zinx "
203 "<zinx@epicsol.org>"); 205 "Verituse <zinx@epicsol.org>");
204 return 0; 206 return 0;
205 207
206fail: 208fail: