diff options
author | Rob Herring <robh@kernel.org> | 2023-10-17 15:34:41 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-10-17 21:38:48 +0100 |
commit | 8f7e17d847edf6bc02d0813b123b9d78ba504098 (patch) | |
tree | 120904e8da64019d8776c30c7c05959470e5e9b5 /drivers/regulator/stm32-booster.c | |
parent | 46537a8676d6555141c4b98ec1bf5f3eea971128 (diff) | |
download | lwn-8f7e17d847edf6bc02d0813b123b9d78ba504098.tar.gz lwn-8f7e17d847edf6bc02d0813b123b9d78ba504098.zip |
regulator: 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>
Link: https://lore.kernel.org/r/20231017203442.2699322-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/stm32-booster.c')
-rw-r--r-- | drivers/regulator/stm32-booster.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/regulator/stm32-booster.c b/drivers/regulator/stm32-booster.c index b64dc5a497fa..2cdc7f0474f8 100644 --- a/drivers/regulator/stm32-booster.c +++ b/drivers/regulator/stm32-booster.c @@ -4,7 +4,7 @@ #include <linux/mfd/syscon.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/regulator/driver.h> @@ -83,8 +83,7 @@ static int stm32_booster_probe(struct platform_device *pdev) if (IS_ERR(regmap)) return PTR_ERR(regmap); - desc = (const struct regulator_desc *) - of_match_device(dev->driver->of_match_table, dev)->data; + desc = device_get_match_data(dev); config.regmap = regmap; config.dev = dev; |