Skip to content

Commit

Permalink
i2c: stm32f7: change setup struct to const
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
patrickdelaunay authored and trini committed Nov 16, 2018
1 parent c0765f4 commit c235b08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/stm32f7_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c235b08

Please sign in to comment.