diff options
Diffstat (limited to 'drivers/iio/light/hid-sensor-prox.c')
-rw-r--r-- | drivers/iio/light/hid-sensor-prox.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c index f5a514698fd8..3ecf79ed08ac 100644 --- a/drivers/iio/light/hid-sensor-prox.c +++ b/drivers/iio/light/hid-sensor-prox.c | |||
@@ -75,7 +75,6 @@ static int prox_read_raw(struct iio_dev *indio_dev, | |||
75 | int report_id = -1; | 75 | int report_id = -1; |
76 | u32 address; | 76 | u32 address; |
77 | int ret_type; | 77 | int ret_type; |
78 | s32 poll_value; | ||
79 | 78 | ||
80 | *val = 0; | 79 | *val = 0; |
81 | *val2 = 0; | 80 | *val2 = 0; |
@@ -92,16 +91,8 @@ static int prox_read_raw(struct iio_dev *indio_dev, | |||
92 | break; | 91 | break; |
93 | } | 92 | } |
94 | if (report_id >= 0) { | 93 | if (report_id >= 0) { |
95 | poll_value = hid_sensor_read_poll_value( | ||
96 | &prox_state->common_attributes); | ||
97 | if (poll_value < 0) | ||
98 | return -EINVAL; | ||
99 | |||
100 | hid_sensor_power_state(&prox_state->common_attributes, | 94 | hid_sensor_power_state(&prox_state->common_attributes, |
101 | true); | 95 | true); |
102 | |||
103 | msleep_interruptible(poll_value * 2); | ||
104 | |||
105 | *val = sensor_hub_input_attr_get_raw_value( | 96 | *val = sensor_hub_input_attr_get_raw_value( |
106 | prox_state->common_attributes.hsdev, | 97 | prox_state->common_attributes.hsdev, |
107 | HID_USAGE_SENSOR_PROX, address, | 98 | HID_USAGE_SENSOR_PROX, address, |
@@ -373,6 +364,7 @@ static struct platform_driver hid_prox_platform_driver = { | |||
373 | .id_table = hid_prox_ids, | 364 | .id_table = hid_prox_ids, |
374 | .driver = { | 365 | .driver = { |
375 | .name = KBUILD_MODNAME, | 366 | .name = KBUILD_MODNAME, |
367 | .pm = &hid_sensor_pm_ops, | ||
376 | }, | 368 | }, |
377 | .probe = hid_prox_probe, | 369 | .probe = hid_prox_probe, |
378 | .remove = hid_prox_remove, | 370 | .remove = hid_prox_remove, |