|
@@ -260,13 +260,12 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
|
|
|
|
|
|
spin_lock_irqsave(&data->lock, flags);
|
|
|
data->pending.status = true;
|
|
|
+ spin_unlock_irqrestore(&data->lock, flags);
|
|
|
report = sensor_hub_report(report_id, hsdev->hdev, HID_INPUT_REPORT);
|
|
|
- if (!report) {
|
|
|
- spin_unlock_irqrestore(&data->lock, flags);
|
|
|
+ if (!report)
|
|
|
goto err_free;
|
|
|
- }
|
|
|
+
|
|
|
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) {
|
|
|
case 1:
|