diff options
author | Joe Perches <joe@perches.com> | 2010-12-09 22:29:03 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-10 09:10:38 -0500 |
commit | 4291ee305e9bb0699504a66f0e2b7aefcf0512a5 (patch) | |
tree | 3996b77eb64d4f3b76a0799f30a5b2ba6cbc9ddb /drivers/hid/hid-emsff.c | |
parent | 5bea7660bba973dc5e8e9d92b11fb1dd5b524ebf (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-emsff.c')
-rw-r--r-- | drivers/hid/hid-emsff.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/hid/hid-emsff.c b/drivers/hid/hid-emsff.c index c61b192d7cff..81877c67caea 100644 --- a/drivers/hid/hid-emsff.c +++ b/drivers/hid/hid-emsff.c | |||
@@ -68,18 +68,18 @@ static int emsff_init(struct hid_device *hid) | |||
68 | int error; | 68 | int error; |
69 | 69 | ||
70 | if (list_empty(report_list)) { | 70 | if (list_empty(report_list)) { |
71 | dev_err(&hid->dev, "no output reports found\n"); | 71 | hid_err(hid, "no output reports found\n"); |
72 | return -ENODEV; | 72 | return -ENODEV; |
73 | } | 73 | } |
74 | 74 | ||
75 | report = list_first_entry(report_list, struct hid_report, list); | 75 | report = list_first_entry(report_list, struct hid_report, list); |
76 | if (report->maxfield < 1) { | 76 | if (report->maxfield < 1) { |
77 | dev_err(&hid->dev, "no fields in the report\n"); | 77 | hid_err(hid, "no fields in the report\n"); |
78 | return -ENODEV; | 78 | return -ENODEV; |
79 | } | 79 | } |
80 | 80 | ||
81 | if (report->field[0]->report_count < 7) { | 81 | if (report->field[0]->report_count < 7) { |
82 | dev_err(&hid->dev, "not enough values in the field\n"); | 82 | hid_err(hid, "not enough values in the field\n"); |
83 | return -ENODEV; | 83 | return -ENODEV; |
84 | } | 84 | } |
85 | 85 | ||
@@ -105,8 +105,7 @@ static int emsff_init(struct hid_device *hid) | |||
105 | emsff->report->field[0]->value[6] = 0x00; | 105 | emsff->report->field[0]->value[6] = 0x00; |
106 | usbhid_submit_report(hid, emsff->report, USB_DIR_OUT); | 106 | usbhid_submit_report(hid, emsff->report, USB_DIR_OUT); |
107 | 107 | ||
108 | dev_info(&hid->dev, "force feedback for EMS based devices by " | 108 | hid_info(hid, "force feedback for EMS based devices by Ignaz Forster <ignaz.forster@gmx.de>\n"); |
109 | "Ignaz Forster <ignaz.forster@gmx.de>\n"); | ||
110 | 109 | ||
111 | return 0; | 110 | return 0; |
112 | } | 111 | } |
@@ -117,13 +116,13 @@ static int ems_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
117 | 116 | ||
118 | ret = hid_parse(hdev); | 117 | ret = hid_parse(hdev); |
119 | if (ret) { | 118 | if (ret) { |
120 | dev_err(&hdev->dev, "parse failed\n"); | 119 | hid_err(hdev, "parse failed\n"); |
121 | goto err; | 120 | goto err; |
122 | } | 121 | } |
123 | 122 | ||
124 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); | 123 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); |
125 | if (ret) { | 124 | if (ret) { |
126 | dev_err(&hdev->dev, "hw start failed\n"); | 125 | hid_err(hdev, "hw start failed\n"); |
127 | goto err; | 126 | goto err; |
128 | } | 127 | } |
129 | 128 | ||