diff options
author | Simon Glass <sjg@chromium.org> | 2016-07-05 17:10:10 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-07-27 14:15:54 -0600 |
commit | 911954859d6dece49c3e4835faea004cfe392506 (patch) | |
tree | 79431b5419e1366009f331a3d1a604b64f14ccff /drivers/pinctrl/rockchip | |
parent | 2e3f1ff63f50f36e74d46f939823241856ebf1bd (diff) | |
download | u-boot-imx-911954859d6dece49c3e4835faea004cfe392506.zip u-boot-imx-911954859d6dece49c3e4835faea004cfe392506.tar.gz u-boot-imx-911954859d6dece49c3e4835faea004cfe392506.tar.bz2 |
dm: Use dm_scan_fdt_dev() directly where possible
Quite a few places have a bind() method which just calls dm_scan_fdt_dev().
We may as well call dm_scan_fdt_dev() directly. Update the code to do this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pinctrl/rockchip')
-rw-r--r-- | drivers/pinctrl/rockchip/pinctrl_rk3036.c | 8 | ||||
-rw-r--r-- | drivers/pinctrl/rockchip/pinctrl_rk3288.c | 13 |
2 files changed, 4 insertions, 17 deletions
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3036.c b/drivers/pinctrl/rockchip/pinctrl_rk3036.c index 3648678..6aea856 100644 --- a/drivers/pinctrl/rockchip/pinctrl_rk3036.c +++ b/drivers/pinctrl/rockchip/pinctrl_rk3036.c @@ -252,12 +252,6 @@ static struct pinctrl_ops rk3036_pinctrl_ops = { .get_periph_id = rk3036_pinctrl_get_periph_id, }; -static int rk3036_pinctrl_bind(struct udevice *dev) -{ - /* scan child GPIO banks */ - return dm_scan_fdt_dev(dev); -} - static int rk3036_pinctrl_probe(struct udevice *dev) { struct rk3036_pinctrl_priv *priv = dev_get_priv(dev); @@ -278,6 +272,6 @@ U_BOOT_DRIVER(pinctrl_rk3036) = { .of_match = rk3036_pinctrl_ids, .priv_auto_alloc_size = sizeof(struct rk3036_pinctrl_priv), .ops = &rk3036_pinctrl_ops, - .bind = rk3036_pinctrl_bind, + .bind = dm_scan_fdt_dev, .probe = rk3036_pinctrl_probe, }; diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3288.c b/drivers/pinctrl/rockchip/pinctrl_rk3288.c index 4650066..ae8a4f1 100644 --- a/drivers/pinctrl/rockchip/pinctrl_rk3288.c +++ b/drivers/pinctrl/rockchip/pinctrl_rk3288.c @@ -663,15 +663,6 @@ static struct pinctrl_ops rk3288_pinctrl_ops = { .get_periph_id = rk3288_pinctrl_get_periph_id, }; -static int rk3288_pinctrl_bind(struct udevice *dev) -{ -#if CONFIG_IS_ENABLED(OF_PLATDATA) - return 0; -#else - return dm_scan_fdt_dev(dev); -#endif -} - #ifndef CONFIG_SPL_BUILD static int rk3288_pinctrl_parse_tables(struct rk3288_pinctrl_priv *priv, struct rockchip_pin_bank *banks, @@ -728,6 +719,8 @@ U_BOOT_DRIVER(pinctrl_rk3288) = { .of_match = rk3288_pinctrl_ids, .priv_auto_alloc_size = sizeof(struct rk3288_pinctrl_priv), .ops = &rk3288_pinctrl_ops, - .bind = rk3288_pinctrl_bind, +#if !CONFIG_IS_ENABLED(OF_PLATDATA) + .bind = dm_scan_fdt_dev, +#endif .probe = rk3288_pinctrl_probe, }; |