diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-02-05 16:33:22 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-02-17 08:05:58 -0500 |
commit | cafebc058bf86e63fff5354864781d3de11e41d3 (patch) | |
tree | 32739f6b0701c7029d0332f87eadfbd4d6960c92 /drivers/hid/hidraw.c | |
parent | f9bcca405624c7f4a0cf4a1b78f8b3a312ca4dab (diff) |
HID: remove hid_get_raw_report in struct hid_device
dev->hid_get_raw_report(X) and hid_hw_raw_request(X, HID_REQ_GET_REPORT)
are strictly equivalent. Switch the hid subsystem to the hid_hw notation
and remove the field .hid_get_raw_report in struct hid_device.
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r-- | drivers/hid/hidraw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index cb0137b3718d..4b2dc956c702 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -189,7 +189,7 @@ static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t | |||
189 | 189 | ||
190 | dev = hidraw_table[minor]->hid; | 190 | dev = hidraw_table[minor]->hid; |
191 | 191 | ||
192 | if (!dev->hid_get_raw_report) { | 192 | if (!dev->ll_driver->raw_request) { |
193 | ret = -ENODEV; | 193 | ret = -ENODEV; |
194 | goto out; | 194 | goto out; |
195 | } | 195 | } |
@@ -216,14 +216,15 @@ static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t | |||
216 | 216 | ||
217 | /* | 217 | /* |
218 | * Read the first byte from the user. This is the report number, | 218 | * Read the first byte from the user. This is the report number, |
219 | * which is passed to dev->hid_get_raw_report(). | 219 | * which is passed to hid_hw_raw_request(). |
220 | */ | 220 | */ |
221 | if (copy_from_user(&report_number, buffer, 1)) { | 221 | if (copy_from_user(&report_number, buffer, 1)) { |
222 | ret = -EFAULT; | 222 | ret = -EFAULT; |
223 | goto out_free; | 223 | goto out_free; |
224 | } | 224 | } |
225 | 225 | ||
226 | ret = dev->hid_get_raw_report(dev, report_number, buf, count, report_type); | 226 | ret = hid_hw_raw_request(dev, report_number, buf, count, report_type, |
227 | HID_REQ_GET_REPORT); | ||
227 | 228 | ||
228 | if (ret < 0) | 229 | if (ret < 0) |
229 | goto out_free; | 230 | goto out_free; |