summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-tmff.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-09-18 12:23:34 +0200
committerJiri Kosina <jkosina@suse.cz>2008-10-14 23:51:01 +0200
commit795750197f240ca2a3f064c0210c4efd40dbaed3 (patch)
tree05c40a4331091817e73710ddf34fcc3a3ab5a2c6 /drivers/hid/hid-tmff.c
parent76483cf4d0efbc35eaf9905a437f2f1be0221360 (diff)
downloadop-kernel-dev-795750197f240ca2a3f064c0210c4efd40dbaed3.zip
op-kernel-dev-795750197f240ca2a3f064c0210c4efd40dbaed3.tar.gz
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 be7ebe2..1b7cba0 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)
switch (field->usage[0].hid) {
case THRUSTMASTER_USAGE_FF:
if (field->report_count < 2) {
- warn("ignoring FF field with "
- "report_count < 2");
+ dev_warn(&hid->dev, "ignoring FF field "
+ "with report_count < 2\n");
continue;
}
if (field->logical_maximum ==
field->logical_minimum) {
- warn("ignoring FF field with "
- "logical_maximum == "
- "logical_minimum");
+ dev_warn(&hid->dev, "ignoring FF field "
+ "with logical_maximum "
+ "== logical_minimum\n");
continue;
}
if (tmff->report && tmff->report != report) {
- warn("ignoring FF field in other "
- "report");
+ dev_warn(&hid->dev, "ignoring FF field "
+ "in other report\n");
continue;
}
if (tmff->ff_field && tmff->ff_field != field) {
- warn("ignoring duplicate FF field");
+ dev_warn(&hid->dev, "ignoring "
+ "duplicate FF field\n");
continue;
}
@@ -182,7 +183,8 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
break;
default:
- warn("ignoring unknown output usage %08x",
+ dev_warn(&hid->dev, "ignoring unknown output "
+ "usage %08x\n",
field->usage[0].hid);
continue;
}
@@ -190,7 +192,7 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
}
if (!tmff->report) {
- err("cant find FF field in output reports\n");
+ dev_err(&hid->dev, "can't find FF field in output reports\n");
error = -ENODEV;
goto fail;
}
@@ -199,8 +201,8 @@ static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
if (error)
goto fail;
- info("Force feedback for ThrustMaster devices by Zinx Verituse "
- "<zinx@epicsol.org>");
+ dev_info(&hid->dev, "force feedback for ThrustMaster devices by Zinx "
+ "Verituse <zinx@epicsol.org>");
return 0;
fail:
OpenPOWER on IntegriCloud