sensor/lsm9ds0_gyro: Make config_info pointers const.
Preparation for const driver configuration data. Change-Id: I8fd83236ecf5357a0a192650a26e91045a6116a7 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit is contained in:
parent
cfb5196f07
commit
67d6b592cf
1 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue