diff options
author | Tang Bin <tangbin@cmss.chinamobile.com> | 2021-08-22 11:28:06 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-26 14:51:10 +0200 |
commit | 74d2fb7e708433b7397d9647ea7ec1cbcb0ae379 (patch) | |
tree | f459790cb6991c2c84b08d521c76a7f5cd9e382e /drivers/tty | |
parent | a6a65f9ee0937d02e8084ee1ed305e38aae848e6 (diff) | |
download | linux-stable-74d2fb7e708433b7397d9647ea7ec1cbcb0ae379.tar.gz linux-stable-74d2fb7e708433b7397d9647ea7ec1cbcb0ae379.tar.bz2 linux-stable-74d2fb7e708433b7397d9647ea7ec1cbcb0ae379.zip |
serial: vt8500: Use of_device_get_match_data
Retrieve OF match data, it's better and cleaner to use
'of_device_get_match_data' over 'of_match_device'.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210822032806.3256-4-tangbin@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/vt8500_serial.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c index c5edd56ff830..e15b2bf69904 100644 --- a/drivers/tty/serial/vt8500_serial.c +++ b/drivers/tty/serial/vt8500_serial.c @@ -623,17 +623,14 @@ static int vt8500_serial_probe(struct platform_device *pdev) struct vt8500_port *vt8500_port; struct resource *mmres, *irqres; struct device_node *np = pdev->dev.of_node; - const struct of_device_id *match; const unsigned int *flags; int ret; int port; - match = of_match_device(wmt_dt_ids, &pdev->dev); - if (!match) + flags = of_device_get_match_data(&pdev->dev); + if (!flags) return -EINVAL; - flags = match->data; - mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); irqres = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!mmres || !irqres) |