Skip to content

Commit

Permalink
i2c/qmsi_ss: Make pointers to config_info const.
Browse files Browse the repository at this point in the history
Change-Id: I7786f9c65e62eee27395d53b6e923dec6c13f1f4
Signed-off-by: Marcus Shawcroft <[email protected]>
  • Loading branch information
mshawcroft authored and Anas Nashif committed Oct 15, 2016
1 parent 3d32b19 commit 0f1d0d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/i2c/i2c_qmsi_ss.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

/* Convenient macros to get the controller instance and the driver data. */
#define GET_CONTROLLER_INSTANCE(dev) \
(((struct i2c_qmsi_ss_config_info *)dev->config->config_info)->instance)
(((const struct i2c_qmsi_ss_config_info *) \
dev->config->config_info)->instance)
#define GET_DRIVER_DATA(dev) \
((struct i2c_qmsi_ss_driver_data *)dev->driver_data)

Expand Down Expand Up @@ -281,7 +282,7 @@ static struct i2c_driver_api api = {
static int i2c_qmsi_ss_init(struct device *dev)
{
struct i2c_qmsi_ss_driver_data *driver_data = GET_DRIVER_DATA(dev);
struct i2c_qmsi_ss_config_info *config = dev->config->config_info;
const struct i2c_qmsi_ss_config_info *config = dev->config->config_info;
qm_ss_i2c_t instance = GET_CONTROLLER_INSTANCE(dev);
int err;

Expand Down

0 comments on commit 0f1d0d4

Please sign in to comment.