summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/berlin/berlin-bg2cd.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/berlin/berlin-bg2cd.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/berlin/berlin-bg2cd.c')
-rw-r--r--drivers/pinctrl/berlin/berlin-bg2cd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pinctrl/berlin/berlin-bg2cd.c b/drivers/pinctrl/berlin/berlin-bg2cd.c
index c0f5d86d5d01..73a1d8c23088 100644
--- a/drivers/pinctrl/berlin/berlin-bg2cd.c
+++ b/drivers/pinctrl/berlin/berlin-bg2cd.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"
@@ -172,10 +173,7 @@ static const struct of_device_id berlin2cd_pinctrl_match[] = {
static int berlin2cd_pinctrl_probe(struct platform_device *pdev)
{
- const struct of_device_id *match =
- of_match_device(berlin2cd_pinctrl_match, &pdev->dev);
-
- return berlin_pinctrl_probe(pdev, match->data);
+ return berlin_pinctrl_probe(pdev, device_get_match_data(&pdev->dev));
}
static struct platform_driver berlin2cd_pinctrl_driver = {