summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-at91.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-09 20:29:13 +0300
committerLinus Walleij <linus.walleij@linaro.org>2023-10-30 16:50:42 +0300
commit63bffc2d3a99eaabc786c513eea71be3f597f175 (patch)
treec3c61b3830c55f7769c8d51733728b0d25aea8b5 /drivers/pinctrl/pinctrl-at91.c
parente2b0bac1aae44d603817b55d62553f3d3557d5a7 (diff)
downloadlinux-63bffc2d3a99eaabc786c513eea71be3f597f175.tar.xz
pinctrl: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20231009172923.2457844-18-robh@kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-at91.c')
-rw-r--r--drivers/pinctrl/pinctrl-at91.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 608f55c5ba5f..5aa9d5c533c6 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -12,10 +12,9 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/of.h>
-#include <linux/of_address.h>
-#include <linux/of_device.h>
-#include <linux/of_irq.h>
+#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/string_helpers.h>
@@ -1302,8 +1301,8 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev,
if (!np)
return -ENODEV;
- info->dev = dev;
- info->ops = of_device_get_match_data(dev);
+ info->dev = &pdev->dev;
+ info->ops = device_get_match_data(&pdev->dev);
at91_pinctrl_child_count(info, np);
/*
@@ -1845,7 +1844,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
if (IS_ERR(at91_chip->regbase))
return PTR_ERR(at91_chip->regbase);
- at91_chip->ops = of_device_get_match_data(dev);
+ at91_chip->ops = device_get_match_data(dev);
at91_chip->pioc_virq = irq;
at91_chip->clock = devm_clk_get_enabled(dev, NULL);