[U-Boot] [PATCHv1 04/14] reset: rockchip: remove request and free functions

Dinh Nguyen dinguyen at kernel.org
Sat Apr 14 18:51:30 UTC 2018


The request and free reset functions are not really used for any useful
purpose but for debugging. We can safely remove them.

Signed-off-by: Dinh Nguyen <dinguyen at kernel.org>
---
 drivers/reset/reset-rockchip.c | 26 +++-----------------------
 1 file changed, 3 insertions(+), 23 deletions(-)

diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c
index 01047a2..5eecd51 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -24,27 +24,6 @@ struct rockchip_reset_priv {
 	u32 reset_reg_num;
 };
 
-static int rockchip_reset_request(struct reset_ctl *reset_ctl)
-{
-	struct rockchip_reset_priv *priv = dev_get_priv(reset_ctl->dev);
-
-	debug("%s(reset_ctl=%p) (dev=%p, id=%lu) (reg_num=%d)\n", __func__,
-	      reset_ctl, reset_ctl->dev, reset_ctl->id, priv->reset_reg_num);
-
-	if (reset_ctl->id / ROCKCHIP_RESET_NUM_IN_REG >= priv->reset_reg_num)
-		return -EINVAL;
-
-	return 0;
-}
-
-static int rockchip_reset_free(struct reset_ctl *reset_ctl)
-{
-	debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl,
-	      reset_ctl->dev, reset_ctl->id);
-
-	return 0;
-}
-
 static int rockchip_reset_assert(struct reset_ctl *reset_ctl)
 {
 	struct rockchip_reset_priv *priv = dev_get_priv(reset_ctl->dev);
@@ -55,6 +34,9 @@ static int rockchip_reset_assert(struct reset_ctl *reset_ctl)
 	      reset_ctl, reset_ctl->dev, reset_ctl->id,
 	      priv->base + (bank * 4));
 
+	if (reset_ctl->id / ROCKCHIP_RESET_NUM_IN_REG >= priv->reset_reg_num)
+		return -EINVAL;
+
 	rk_setreg(priv->base + (bank * 4), BIT(offset));
 
 	return 0;
@@ -76,8 +58,6 @@ static int rockchip_reset_deassert(struct reset_ctl *reset_ctl)
 }
 
 struct reset_ops rockchip_reset_ops = {
-	.request = rockchip_reset_request,
-	.free = rockchip_reset_free,
 	.rst_assert = rockchip_reset_assert,
 	.rst_deassert = rockchip_reset_deassert,
 };
-- 
2.7.4



More information about the U-Boot mailing list