diff options
author | Stephen Boyd <swboyd@chromium.org> | 2021-01-22 19:44:25 -0800 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2021-01-26 12:17:32 -0600 |
commit | d825f0bea20f49a8f413a6acd7c4100ea55edf6d (patch) | |
tree | 249a950f5b0f640a4bbfbd2374f23931f3cdd0e1 /drivers/tty/serial/stm32-usart.h | |
parent | 0e658fdd4b2d6fd8f3b83f27fd075b7b2a1d686d (diff) | |
download | linux-stable-d825f0bea20f49a8f413a6acd7c4100ea55edf6d.tar.gz linux-stable-d825f0bea20f49a8f413a6acd7c4100ea55edf6d.tar.bz2 linux-stable-d825f0bea20f49a8f413a6acd7c4100ea55edf6d.zip |
serial: stm32: Use of_device_get_match_data()
This driver casts away the constness of struct stm32_usart_info that is
pointed to by the of match table. Use of_device_get_match_data() instead
of of_match_device() here and push the const throughout the code so that
we don't cast away const. This nicely avoids referencing the match table
when it is undefined with configurations where CONFIG_OF=n and fixes the
const issues.
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: <linux-serial@vger.kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210123034428.2841052-4-swboyd@chromium.org
Diffstat (limited to 'drivers/tty/serial/stm32-usart.h')
-rw-r--r-- | drivers/tty/serial/stm32-usart.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h index d4c916e78d40..cb4f327c46db 100644 --- a/drivers/tty/serial/stm32-usart.h +++ b/drivers/tty/serial/stm32-usart.h @@ -259,7 +259,7 @@ struct stm32_usart_info stm32h7_info = { struct stm32_port { struct uart_port port; struct clk *clk; - struct stm32_usart_info *info; + const struct stm32_usart_info *info; struct dma_chan *rx_ch; /* dma rx channel */ dma_addr_t rx_dma_buf; /* dma rx buffer bus address */ unsigned char *rx_buf; /* dma rx buffer cpu address */ |