aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-02-05 16:33:22 -0500
committerJiri Kosina <jkosina@suse.cz>2014-02-17 08:05:58 -0500
commitcafebc058bf86e63fff5354864781d3de11e41d3 (patch)
tree32739f6b0701c7029d0332f87eadfbd4d6960c92 /drivers
parentf9bcca405624c7f4a0cf4a1b78f8b3a312ca4dab (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')
-rw-r--r--drivers/hid/hid-input.c6
-rw-r--r--drivers/hid/hid-sony.c3
-rw-r--r--drivers/hid/hidraw.c7
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c1
-rw-r--r--drivers/hid/uhid.c1
-rw-r--r--drivers/hid/usbhid/hid-core.c1
6 files changed, 9 insertions, 10 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index e5bb3c378292..5bd17b256856 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -350,9 +350,9 @@ static int hidinput_get_battery_property(struct power_supply *psy,
350 ret = -ENOMEM; 350 ret = -ENOMEM;
351 break; 351 break;
352 } 352 }
353 ret = dev->hid_get_raw_report(dev, dev->battery_report_id, 353 ret = hid_hw_raw_request(dev, dev->battery_report_id, buf, 2,
354 buf, 2, 354 dev->battery_report_type,
355 dev->battery_report_type); 355 HID_REQ_GET_REPORT);
356 356
357 if (ret != 2) { 357 if (ret != 2) {
358 ret = -ENODATA; 358 ret = -ENODATA;
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 12354055d474..3930acbdee98 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -706,7 +706,8 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
706 if (!buf) 706 if (!buf)
707 return -ENOMEM; 707 return -ENOMEM;
708 708
709 ret = hdev->hid_get_raw_report(hdev, 0xf2, buf, 17, HID_FEATURE_REPORT); 709 ret = hid_hw_raw_request(hdev, 0xf2, buf, 17, HID_FEATURE_REPORT,
710 HID_REQ_GET_REPORT);
710 711
711 if (ret < 0) 712 if (ret < 0)
712 hid_err(hdev, "can't set operational mode\n"); 713 hid_err(hdev, "can't set operational mode\n");
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;
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index e914f2755491..f4ea7343e823 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1005,7 +1005,6 @@ static int i2c_hid_probe(struct i2c_client *client,
1005 1005
1006 hid->driver_data = client; 1006 hid->driver_data = client;
1007 hid->ll_driver = &i2c_hid_ll_driver; 1007 hid->ll_driver = &i2c_hid_ll_driver;
1008 hid->hid_get_raw_report = i2c_hid_get_raw_report;
1009 hid->hid_output_raw_report = i2c_hid_output_raw_report; 1008 hid->hid_output_raw_report = i2c_hid_output_raw_report;
1010 hid->dev.parent = &client->dev; 1009 hid->dev.parent = &client->dev;
1011 ACPI_COMPANION_SET(&hid->dev, ACPI_COMPANION(&client->dev)); 1010 ACPI_COMPANION_SET(&hid->dev, ACPI_COMPANION(&client->dev));
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index f5a2b1931143..12439e1eeae2 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -404,7 +404,6 @@ static int uhid_dev_create(struct uhid_device *uhid,
404 hid->uniq[63] = 0; 404 hid->uniq[63] = 0;
405 405
406 hid->ll_driver = &uhid_hid_driver; 406 hid->ll_driver = &uhid_hid_driver;
407 hid->hid_get_raw_report = uhid_hid_get_raw;
408 hid->hid_output_raw_report = uhid_hid_output_raw; 407 hid->hid_output_raw_report = uhid_hid_output_raw;
409 hid->bus = ev->u.create.bus; 408 hid->bus = ev->u.create.bus;
410 hid->vendor = ev->u.create.vendor; 409 hid->vendor = ev->u.create.vendor;
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 406497b120ea..b9a770f4d7ae 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -1289,7 +1289,6 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
1289 1289
1290 usb_set_intfdata(intf, hid); 1290 usb_set_intfdata(intf, hid);
1291 hid->ll_driver = &usb_hid_driver; 1291 hid->ll_driver = &usb_hid_driver;
1292 hid->hid_get_raw_report = usbhid_get_raw_report;
1293 hid->hid_output_raw_report = usbhid_output_raw_report; 1292 hid->hid_output_raw_report = usbhid_output_raw_report;
1294 hid->ff_init = hid_pidff_init; 1293 hid->ff_init = hid_pidff_init;
1295#ifdef CONFIG_USB_HIDDEV 1294#ifdef CONFIG_USB_HIDDEV