From 67d6b592cf1b1df4f230a1421302948c66716f5e Mon Sep 17 00:00:00 2001 From: Marcus Shawcroft Date: Thu, 6 Oct 2016 20:09:33 +0100 Subject: [PATCH] sensor/lsm9ds0_gyro: Make config_info pointers const. Preparation for const driver configuration data. Change-Id: I8fd83236ecf5357a0a192650a26e91045a6116a7 Signed-off-by: Marcus Shawcroft --- drivers/sensor/sensor_lsm9ds0_gyro.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/sensor/sensor_lsm9ds0_gyro.c b/drivers/sensor/sensor_lsm9ds0_gyro.c index 358a63e2823..625208526cd 100644 --- a/drivers/sensor/sensor_lsm9ds0_gyro.c +++ b/drivers/sensor/sensor_lsm9ds0_gyro.c @@ -31,7 +31,7 @@ static inline int lsm9ds0_gyro_power_ctrl(struct device *dev, int power, int x_en, int y_en, int z_en) { struct lsm9ds0_gyro_data *data = dev->driver_data; - struct lsm9ds0_gyro_config *config = dev->config->config_info; + const struct lsm9ds0_gyro_config *config = dev->config->config_info; uint8_t state = (power << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_PD) | (x_en << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_XEN) | (y_en << LSM9DS0_GYRO_SHIFT_CTRL_REG1_G_YEN) | @@ -49,7 +49,7 @@ static inline int lsm9ds0_gyro_power_ctrl(struct device *dev, int power, static int lsm9ds0_gyro_set_fs_raw(struct device *dev, uint8_t fs) { struct lsm9ds0_gyro_data *data = dev->driver_data; - struct lsm9ds0_gyro_config *config = dev->config->config_info; + const struct lsm9ds0_gyro_config *config = dev->config->config_info; if (i2c_reg_update_byte(data->i2c_master, config->i2c_slave_addr, LSM9DS0_GYRO_REG_CTRL_REG4_G, @@ -90,7 +90,7 @@ static int lsm9ds0_gyro_set_fs(struct device *dev, int fs) static inline int lsm9ds0_gyro_set_odr_raw(struct device *dev, uint8_t odr) { struct lsm9ds0_gyro_data *data = dev->driver_data; - struct lsm9ds0_gyro_config *config = dev->config->config_info; + const struct lsm9ds0_gyro_config *config = dev->config->config_info; return i2c_reg_update_byte(data->i2c_master, config->i2c_slave_addr, LSM9DS0_GYRO_REG_CTRL_REG1_G, @@ -127,7 +127,7 @@ static int lsm9ds0_gyro_sample_fetch(struct device *dev, enum sensor_channel chan) { struct lsm9ds0_gyro_data *data = dev->driver_data; - struct lsm9ds0_gyro_config *config = dev->config->config_info; + const struct lsm9ds0_gyro_config *config = dev->config->config_info; uint8_t x_l, x_h, y_l, y_h, z_l, z_h; __ASSERT_NO_MSG(chan == SENSOR_CHAN_ALL || chan == SENSOR_CHAN_GYRO_ANY); @@ -272,7 +272,7 @@ static struct sensor_driver_api lsm9ds0_gyro_api_funcs = { static int lsm9ds0_gyro_init_chip(struct device *dev) { struct lsm9ds0_gyro_data *data = dev->driver_data; - struct lsm9ds0_gyro_config *config = dev->config->config_info; + const struct lsm9ds0_gyro_config *config = dev->config->config_info; uint8_t chip_id; if (lsm9ds0_gyro_power_ctrl(dev, 0, 0, 0, 0) < 0) {