[PATCH 04/20] pinctrl/rockchip: switch to use device_get_match_data
Jianqun Xu
jay.xu at rock-chips.com
Tue Sep 20 03:30:52 PDT 2022
Switch to use device_get_match_data to get match data.
Signed-off-by: Jianqun Xu <jay.xu at rock-chips.com>
---
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
More information about the Linux-rockchip
mailing list