Commit f6a4e0e8 authored by Tang Bin's avatar Tang Bin Committed by David S. Miller

via-velocity: Use of_device_get_match_data to simplify code

Retrieve OF match data, it's better and cleaner to use
'of_device_get_match_data' over 'of_match_device'.
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b708a96d
......@@ -2943,14 +2943,12 @@ static void velocity_pci_remove(struct pci_dev *pdev)
static int velocity_platform_probe(struct platform_device *pdev)
{
const struct of_device_id *of_id;
const struct velocity_info_tbl *info;
int irq;
of_id = of_match_device(velocity_of_ids, &pdev->dev);
if (!of_id)
info = of_device_get_match_data(&pdev->dev);
if (!info)
return -EINVAL;
info = of_id->data;
irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (!irq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment