drivers/pinmux|pinctrl: stm32f1: Fix broken cast in remap
remap information is coded in 10 bits, uint16_t should be used to cast it. Fixes #40688 Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
b5725061d2
commit
6026d3c5bf
2 changed files with 2 additions and 2 deletions
|
@ -108,7 +108,7 @@ static int stm32_pins_remap(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt)
|
||||||
volatile uint32_t *reg;
|
volatile uint32_t *reg;
|
||||||
uint16_t remap;
|
uint16_t remap;
|
||||||
|
|
||||||
remap = (uint8_t)STM32_DT_PINMUX_REMAP(pins[0].pinmux);
|
remap = (uint16_t)STM32_DT_PINMUX_REMAP(pins[0].pinmux);
|
||||||
|
|
||||||
/* not remappable */
|
/* not remappable */
|
||||||
if (remap == NO_REMAP) {
|
if (remap == NO_REMAP) {
|
||||||
|
|
|
@ -219,7 +219,7 @@ int stm32_dt_pinctrl_remap(const struct soc_gpio_pinctrl *pinctrl,
|
||||||
volatile uint32_t *reg;
|
volatile uint32_t *reg;
|
||||||
uint16_t remap;
|
uint16_t remap;
|
||||||
|
|
||||||
remap = (uint8_t)STM32_DT_PINMUX_REMAP(pinctrl[0].pinmux);
|
remap = (uint16_t)STM32_DT_PINMUX_REMAP(pinctrl[0].pinmux);
|
||||||
|
|
||||||
/* not remappable */
|
/* not remappable */
|
||||||
if (remap == NO_REMAP) {
|
if (remap == NO_REMAP) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue