summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-04-30 10:38:19 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-05-16 15:35:24 +0300
commit0c695e38d94f007f0820d9c46df6f6d1fc855a8a (patch)
treea1daeb9e87f2c68d522f9242e925d6815adf2bce
parent23e577ebee3c3c578a993f0a4fa094feeae6f300 (diff)
downloadlinux-0c695e38d94f007f0820d9c46df6f6d1fc855a8a.tar.xz
gpio: xlp: Use of_device_get_match_data()
Use of_device_get_match_data() instead of open-coding it. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-xlp.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-xlp.c b/drivers/gpio/gpio-xlp.c
index e74bd43a6974..8e4275eaa7d7 100644
--- a/drivers/gpio/gpio-xlp.c
+++ b/drivers/gpio/gpio-xlp.c
@@ -322,14 +322,7 @@ static int xlp_gpio_probe(struct platform_device *pdev)
return irq;
if (pdev->dev.of_node) {
- const struct of_device_id *of_id;
-
- 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;
+ soc_type = (uintptr_t)of_device_get_match_data(&pdev->dev);
} else {
const struct acpi_device_id *acpi_id;