diff options
author | Patrick Delaunay | 2018-10-29 15:31:56 +0100 |
---|---|---|
committer | Tom Rini | 2018-11-16 16:51:58 -0500 |
commit | c235b087b393f02790608a94d9c15df282abca28 (patch) | |
tree | 3c718c069a8ef72de9c95b6db034962741327553 /drivers | |
parent | c0765f47d843ff5de891b8f962d69fce2b3dade8 (diff) |
i2c: stm32f7: change setup struct to const
Change static array to const when it is useful to save memory
(move stm32f7_setup=0x18 from .data to .rodata section)
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/stm32f7_i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c index 7ed04d9bfcc..3872364d6bf 100644 --- a/drivers/i2c/stm32f7_i2c.c +++ b/drivers/i2c/stm32f7_i2c.c @@ -197,7 +197,7 @@ struct stm32_i2c_priv { int speed; }; -static struct stm32_i2c_spec i2c_specs[] = { +static const struct stm32_i2c_spec i2c_specs[] = { [STM32_I2C_SPEED_STANDARD] = { .rate = STANDARD_RATE, .rate_min = 8000, @@ -236,7 +236,7 @@ static struct stm32_i2c_spec i2c_specs[] = { }, }; -static struct stm32_i2c_setup stm32f7_setup = { +static const struct stm32_i2c_setup stm32f7_setup = { .rise_time = STM32_I2C_RISE_TIME_DEFAULT, .fall_time = STM32_I2C_FALL_TIME_DEFAULT, .dnf = STM32_I2C_DNF_DEFAULT, |