mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:20:49 +07:00
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>
This commit is contained in:
parent
23e577ebee
commit
0c695e38d9
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user