|
@@ -51,8 +51,6 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
|
|
st->report_state.report_id,
|
|
st->report_state.report_id,
|
|
st->report_state.index,
|
|
st->report_state.index,
|
|
HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM);
|
|
HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM);
|
|
-
|
|
|
|
- poll_value = hid_sensor_read_poll_value(st);
|
|
|
|
} else {
|
|
} else {
|
|
int val;
|
|
int val;
|
|
|
|
|
|
@@ -89,7 +87,9 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
|
|
sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
|
|
sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
|
|
st->power_state.index,
|
|
st->power_state.index,
|
|
sizeof(state_val), &state_val);
|
|
sizeof(state_val), &state_val);
|
|
- if (state && poll_value)
|
|
|
|
|
|
+ if (state)
|
|
|
|
+ poll_value = hid_sensor_read_poll_value(st);
|
|
|
|
+ if (poll_value > 0)
|
|
msleep_interruptible(poll_value * 2);
|
|
msleep_interruptible(poll_value * 2);
|
|
|
|
|
|
return 0;
|
|
return 0;
|