Commit 0c695e38 authored by Thierry Reding's avatar Thierry Reding Committed by Linus Walleij

gpio: xlp: Use of_device_get_match_data()

Use of_device_get_match_data() instead of open-coding it.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 23e577eb
...@@ -322,14 +322,7 @@ static int xlp_gpio_probe(struct platform_device *pdev) ...@@ -322,14 +322,7 @@ static int xlp_gpio_probe(struct platform_device *pdev)
return irq; return irq;
if (pdev->dev.of_node) { if (pdev->dev.of_node) {
const struct of_device_id *of_id; soc_type = (uintptr_t)of_device_get_match_data(&pdev->dev);
of_id = of_match_device(xlp_gpio_of_ids, &pdev->dev);
if (!of_id) {
dev_err(&pdev->dev, "Unable to match OF ID\n");
return -ENODEV;
}
soc_type = (uintptr_t) of_id->data;
} else { } else {
const struct acpi_device_id *acpi_id; const struct acpi_device_id *acpi_id;
......
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