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

Message ID 1523731900-4675-5-git-send-email-dinguyen@kernel.org
State Changes Requested
Delegated to: Simon Glass
Headers show
Series
  • reset: remove request and free functions
Related show

Commit Message

Dinh Nguyen April 14, 2018, 6:51 p.m.
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@kernel.org>
---
 drivers/reset/reset-rockchip.c | 26 +++-----------------------
 1 file changed, 3 insertions(+), 23 deletions(-)

Patch

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,
 };