Skip to content

Commit 74d2fb7

Browse files
Tang Bingregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Tang Bin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a6a65f9 commit 74d2fb7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/tty/serial/vt8500_serial.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,17 +623,14 @@ static int vt8500_serial_probe(struct platform_device *pdev)
623623
struct vt8500_port *vt8500_port;
624624
struct resource *mmres, *irqres;
625625
struct device_node *np = pdev->dev.of_node;
626-
const struct of_device_id *match;
627626
const unsigned int *flags;
628627
int ret;
629628
int port;
630629

631-
match = of_match_device(wmt_dt_ids, &pdev->dev);
632-
if (!match)
630+
flags = of_device_get_match_data(&pdev->dev);
631+
if (!flags)
633632
return -EINVAL;
634633

635-
flags = match->data;
636-
637634
mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
638635
irqres = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
639636
if (!mmres || !irqres)

0 commit comments

Comments
 (0)