diff options
author | Fabio Estevam <festevam@gmail.com> | 2021-01-18 09:44:47 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-20 18:48:15 +0100 |
commit | e8372c4f51d01c3db3d067ee8d62d24368606262 (patch) | |
tree | 114a9999ed4358f0dccac815eb14eb246cde55e2 /drivers/tty | |
parent | f754ed71b79cca5b07e76aaf28ce3c8776ab1f7f (diff) | |
download | linux-e8372c4f51d01c3db3d067ee8d62d24368606262.tar.bz2 |
serial: fsl_lpuart: Use of_device_get_match_data()
The retrieval of driver data via of_device_get_match_data() can make
the code simpler.
Use of_device_get_match_data() to simplify the code.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118124447.1632092-1-festevam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index bd047e1f9bea..794035041744 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -2580,9 +2580,7 @@ static struct uart_driver lpuart_reg = { static int lpuart_probe(struct platform_device *pdev) { - const struct of_device_id *of_id = of_match_device(lpuart_dt_ids, - &pdev->dev); - const struct lpuart_soc_data *sdata = of_id->data; + const struct lpuart_soc_data *sdata = of_device_get_match_data(&pdev->dev); struct device_node *np = pdev->dev.of_node; struct lpuart_port *sport; struct resource *res; |