Merge tag 'regulator-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[deliverable/linux.git] / drivers / iio / common / hid-sensors / hid-sensor-trigger.c
index 87419c41b991da24d8d284d33502c81f72c1c377..b6e77e0fc420133af7a324de6a0531bfb045f33d 100644 (file)
@@ -34,6 +34,12 @@ static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig,
        struct hid_sensor_common *st = iio_trigger_get_drvdata(trig);
        int state_val;
 
+       if (state) {
+               if (sensor_hub_device_open(st->hsdev))
+                       return -EIO;
+       } else
+               sensor_hub_device_close(st->hsdev);
+
        state_val = state ? 1 : 0;
        if (IS_ENABLED(CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS))
                ++state_val;
This page took 0.024468 seconds and 5 git commands to generate.