diff options
author | Rob Herring <robh@kernel.org> | 2023-11-15 21:58:48 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2023-11-28 17:23:01 +0100 |
commit | c1d884118f9b1544b39744f2c148fc87050488c1 (patch) | |
tree | 2903bc66689ae57948bb76e935a05a40e2727e22 /drivers/reset/reset-npcm.c | |
parent | reset: reset-meson: add support for Amlogic C3 SoC Reset Controller (diff) | |
download | linux-c1d884118f9b1544b39744f2c148fc87050488c1.tar.xz linux-c1d884118f9b1544b39744f2c148fc87050488c1.zip |
reset: 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: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://lore.kernel.org/r/20231115205848.3732609-1-robh@kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset/reset-npcm.c')
-rw-r--r-- | drivers/reset/reset-npcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/reset/reset-npcm.c b/drivers/reset/reset-npcm.c index f6c4f854f2be..8935ef95a2d1 100644 --- a/drivers/reset/reset-npcm.c +++ b/drivers/reset/reset-npcm.c @@ -6,8 +6,8 @@ #include <linux/io.h> #include <linux/init.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/reboot.h> #include <linux/reset-controller.h> #include <linux/spinlock.h> @@ -351,8 +351,7 @@ static int npcm_usb_reset(struct platform_device *pdev, struct npcm_rc_data *rc) } } - rc->info = (const struct npcm_reset_info *) - of_match_device(dev->driver->of_match_table, dev)->data; + rc->info = device_get_match_data(dev); switch (rc->info->bmc_id) { case BMC_NPCM7XX: npcm_usb_reset_npcm7xx(rc); |