]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpio: eic-sprd: use generic device_get_match_data()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 7 Oct 2024 10:28:59 +0000 (12:28 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 14 Oct 2024 08:28:56 +0000 (10:28 +0200)
There's no need to use the OF-specific variant to get the match data.
Switch to using device_get_match_data() instead.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20241007102859.35602-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-eic-sprd.c

index 2dd0e46c42adde2dd05b54ae41bb5d8341cd6beb..d4bf8d187e166405d7527490858ae2f312381c65 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/notifier.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/spinlock.h>
 
 /* EIC registers definition */
@@ -617,7 +617,7 @@ static int sprd_eic_probe(struct platform_device *pdev)
        u16 num_banks = 0;
        int ret, i;
 
-       pdata = of_device_get_match_data(dev);
+       pdata = device_get_match_data(dev);
        if (!pdata) {
                dev_err(dev, "No matching driver data found.\n");
                return -EINVAL;