Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thierry Reding and committed by
Linus Walleij
0c695e38 23e577eb

+1 -8
+1 -8
drivers/gpio/gpio-xlp.c
··· 322 322 return irq; 323 323 324 324 if (pdev->dev.of_node) { 325 - const struct of_device_id *of_id; 326 - 327 - of_id = of_match_device(xlp_gpio_of_ids, &pdev->dev); 328 - if (!of_id) { 329 - dev_err(&pdev->dev, "Unable to match OF ID\n"); 330 - return -ENODEV; 331 - } 332 - soc_type = (uintptr_t) of_id->data; 325 + soc_type = (uintptr_t)of_device_get_match_data(&pdev->dev); 333 326 } else { 334 327 const struct acpi_device_id *acpi_id; 335 328