diff options
Diffstat (limited to 'app/drivers/sensor/ec11/ec11.c')
-rw-r--r-- | app/drivers/sensor/ec11/ec11.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/drivers/sensor/ec11/ec11.c b/app/drivers/sensor/ec11/ec11.c index 692e691..80e75aa 100644 --- a/app/drivers/sensor/ec11/ec11.c +++ b/app/drivers/sensor/ec11/ec11.c @@ -19,7 +19,7 @@ LOG_MODULE_REGISTER(EC11, CONFIG_SENSOR_LOG_LEVEL); static int ec11_get_ab_state(struct device *dev) { - struct ec11_data *drv_data = dev->driver_data; + struct ec11_data *drv_data = dev->data; const struct ec11_config *drv_cfg = dev->config; return (gpio_pin_get(drv_data->a, drv_cfg->a_pin) << 1) | @@ -27,7 +27,7 @@ static int ec11_get_ab_state(struct device *dev) { } static int ec11_sample_fetch(struct device *dev, enum sensor_channel chan) { - struct ec11_data *drv_data = dev->driver_data; + struct ec11_data *drv_data = dev->data; const struct ec11_config *drv_cfg = dev->config; uint8_t val; int8_t delta; @@ -70,7 +70,7 @@ static int ec11_sample_fetch(struct device *dev, enum sensor_channel chan) { static int ec11_channel_get(struct device *dev, enum sensor_channel chan, struct sensor_value *val) { - struct ec11_data *drv_data = dev->driver_data; + struct ec11_data *drv_data = dev->data; if (chan != SENSOR_CHAN_ROTATION) { return -ENOTSUP; @@ -91,7 +91,7 @@ static const struct sensor_driver_api ec11_driver_api = { }; int ec11_init(struct device *dev) { - struct ec11_data *drv_data = dev->driver_data; + struct ec11_data *drv_data = dev->data; const struct ec11_config *drv_cfg = dev->config; LOG_DBG("A: %s %d B: %s %d resolution %d", drv_cfg->a_label, drv_cfg->a_pin, drv_cfg->b_label, |