Merge tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / drivers / hid / hid-sensor-hub.c
index 6679788bf75ac0b93126de3b7cac920289c618bb..ca74981073271effdddc72ba1f173acea27ebbf9 100644 (file)
@@ -18,8 +18,6 @@
  */
 #include <linux/device.h>
 #include <linux/hid.h>
-#include <linux/usb.h>
-#include "usbhid/usbhid.h"
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/mfd/core.h>
@@ -204,8 +202,8 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
                goto done_proc;
        }
        hid_set_field(report->field[field_index], 0, value);
-       usbhid_submit_report(hsdev->hdev, report, USB_DIR_OUT);
-       usbhid_wait_io(hsdev->hdev);
+       hid_hw_request(hsdev->hdev, report, HID_REQ_SET_REPORT);
+       hid_hw_wait(hsdev->hdev);
 
 done_proc:
        mutex_unlock(&data->mutex);
@@ -227,8 +225,8 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
                ret = -EINVAL;
                goto done_proc;
        }
-       usbhid_submit_report(hsdev->hdev, report, USB_DIR_IN);
-       usbhid_wait_io(hsdev->hdev);
+       hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT);
+       hid_hw_wait(hsdev->hdev);
        *value = report->field[field_index]->value[0];
 
 done_proc:
@@ -262,7 +260,7 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
                spin_unlock_irqrestore(&data->lock, flags);
                goto err_free;
        }
-       usbhid_submit_report(hsdev->hdev, report, USB_DIR_IN);
+       hid_hw_request(hsdev->hdev, report, HID_REQ_GET_REPORT);
        spin_unlock_irqrestore(&data->lock, flags);
        wait_for_completion_interruptible_timeout(&data->pending.ready, HZ*5);
        switch (data->pending.raw_size) {