drivers: i2s: Add missing const qualifiers
The i2s_config structure passed to the i2s_configure() function is not supposed to be modified by the driver. Similarly, the structure returned by the i2s_config_get() function is not supposed to be modified outside the driver. Decorate the pointers to those structures with the const qualifier and correct one driver that actually modified the structure passed to i2s_configure(). Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
e4c7f4d62a
commit
7fcf78073b
8 changed files with 33 additions and 29 deletions
|
@ -181,7 +181,7 @@ static int i2s_stm32_set_clock(const struct device *dev,
|
|||
}
|
||||
|
||||
static int i2s_stm32_configure(const struct device *dev, enum i2s_dir dir,
|
||||
struct i2s_config *i2s_cfg)
|
||||
const struct i2s_config *i2s_cfg)
|
||||
{
|
||||
const struct i2s_stm32_cfg *const cfg = DEV_CFG(dev);
|
||||
struct i2s_stm32_data *const dev_data = DEV_DATA(dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue