diff options
author | Rob Herring <robh@kernel.org> | 2023-10-09 20:29:13 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-10-30 16:50:42 +0300 |
commit | 63bffc2d3a99eaabc786c513eea71be3f597f175 (patch) | |
tree | c3c61b3830c55f7769c8d51733728b0d25aea8b5 /drivers/pinctrl/berlin/pinctrl-as370.c | |
parent | e2b0bac1aae44d603817b55d62553f3d3557d5a7 (diff) | |
download | linux-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/berlin/pinctrl-as370.c')
-rw-r--r-- | drivers/pinctrl/berlin/pinctrl-as370.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/pinctrl/berlin/pinctrl-as370.c b/drivers/pinctrl/berlin/pinctrl-as370.c index b631c14813a7..fc0daec94e10 100644 --- a/drivers/pinctrl/berlin/pinctrl-as370.c +++ b/drivers/pinctrl/berlin/pinctrl-as370.c @@ -8,8 +8,9 @@ */ #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/regmap.h> #include "berlin.h" @@ -330,8 +331,8 @@ static const struct of_device_id as370_pinctrl_match[] = { static int as370_pinctrl_probe(struct platform_device *pdev) { - const struct of_device_id *match = - of_match_device(as370_pinctrl_match, &pdev->dev); + const struct berlin_pinctrl_desc *desc = + device_get_match_data(&pdev->dev); struct regmap_config *rmconfig; struct regmap *regmap; struct resource *res; @@ -354,7 +355,7 @@ static int as370_pinctrl_probe(struct platform_device *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); - return berlin_pinctrl_probe_regmap(pdev, match->data, regmap); + return berlin_pinctrl_probe_regmap(pdev, desc, regmap); } static struct platform_driver as370_pinctrl_driver = { |