[PATCH 04/20] pinctrl/rockchip: switch to use device_get_match_data

From: Jianqun Xu
Date: Tue Sep 20 2022 - 06:31:37 EST


Switch to use device_get_match_data to get match data.

Signed-off-by: Jianqun Xu <jay.xu@xxxxxxxxxxxxxx>
---
drivers/pinctrl/pinctrl-rockchip.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 723b44edc1f2..8f102f327af8 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -3129,16 +3129,11 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(
struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct fwnode_handle *fwnode = dev_fwnode(dev);
- struct device_node *node = to_of_node(fwnode);
- const struct of_device_id *match;
struct rockchip_pin_ctrl *ctrl;
struct rockchip_pin_bank *bank;
int grf_offs, pmu_offs, drv_grf_offs, drv_pmu_offs, i, j;

- match = of_match_node(rockchip_pinctrl_dt_match, node);
- ctrl = (struct rockchip_pin_ctrl *)match->data;
-
+ ctrl = (struct rockchip_pin_ctrl *)device_get_match_data(dev);
grf_offs = ctrl->grf_mux_offset;
pmu_offs = ctrl->pmu_mux_offset;
drv_pmu_offs = ctrl->pmu_drv_offset;
--
2.25.1