aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-ntrig.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-12-09 22:29:03 -0500
committerJiri Kosina <jkosina@suse.cz>2010-12-10 09:10:38 -0500
commit4291ee305e9bb0699504a66f0e2b7aefcf0512a5 (patch)
tree3996b77eb64d4f3b76a0799f30a5b2ba6cbc9ddb /drivers/hid/hid-ntrig.c
parent5bea7660bba973dc5e8e9d92b11fb1dd5b524ebf (diff)
HID: Add and use hid_<level>: dev_<level> equivalents
Neaten current uses of dev_<level> by adding and using hid specific hid_<level> macros. Convert existing uses of dev_<level> uses to hid_<level>. Convert hid-pidff printk uses to hid_<level>. Remove err_hid and use hid_err instead. Add missing newlines to logging messages where necessary. Coalesce format strings. Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt Other miscellaneous changes: Add const struct hid_device * argument to hid-core functions extract() and implement() so hid_<level> can be used by them. Fix bad indentation in hid-core hid_input_field function that calls extract() function above. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-ntrig.c')
-rw-r--r--drivers/hid/hid-ntrig.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 69169efa1e16..beb403421e72 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -130,8 +130,7 @@ static void ntrig_report_version(struct hid_device *hdev)
130 if (ret == 8) { 130 if (ret == 8) {
131 ret = ntrig_version_string(&data[2], buf); 131 ret = ntrig_version_string(&data[2], buf);
132 132
133 dev_info(&hdev->dev, 133 hid_info(hdev, "Firmware version: %s (%02x%02x %02x%02x)\n",
134 "Firmware version: %s (%02x%02x %02x%02x)\n",
135 buf, data[2], data[3], data[4], data[5]); 134 buf, data[2], data[3], data[4], data[5]);
136 } 135 }
137 136
@@ -831,7 +830,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
831 830
832 nd = kmalloc(sizeof(struct ntrig_data), GFP_KERNEL); 831 nd = kmalloc(sizeof(struct ntrig_data), GFP_KERNEL);
833 if (!nd) { 832 if (!nd) {
834 dev_err(&hdev->dev, "cannot allocate N-Trig data\n"); 833 hid_err(hdev, "cannot allocate N-Trig data\n");
835 return -ENOMEM; 834 return -ENOMEM;
836 } 835 }
837 836
@@ -850,13 +849,13 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
850 849
851 ret = hid_parse(hdev); 850 ret = hid_parse(hdev);
852 if (ret) { 851 if (ret) {
853 dev_err(&hdev->dev, "parse failed\n"); 852 hid_err(hdev, "parse failed\n");
854 goto err_free; 853 goto err_free;
855 } 854 }
856 855
857 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); 856 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
858 if (ret) { 857 if (ret) {
859 dev_err(&hdev->dev, "hw start failed\n"); 858 hid_err(hdev, "hw start failed\n");
860 goto err_free; 859 goto err_free;
861 } 860 }
862 861