[U-Boot] [PATCHv1 06/14] reset: bcm6345: remove request and free functions

Dinh Nguyen dinguyen at kernel.org
Sat Apr 14 18:51:32 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-bcm6345.c | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index ebf6bee..b49a2f1 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -23,6 +23,9 @@ static int bcm6345_reset_assert(struct reset_ctl *rst)
 {
 	struct bcm6345_reset_priv *priv = dev_get_priv(rst->dev);
 
+	if (rst->id >= MAX_RESETS)
+		return -EINVAL;
+
 	clrbits_be32(priv->regs, BIT(rst->id));
 	mdelay(20);
 
@@ -33,28 +36,16 @@ static int bcm6345_reset_deassert(struct reset_ctl *rst)
 {
 	struct bcm6345_reset_priv *priv = dev_get_priv(rst->dev);
 
+	if (rst->id >= MAX_RESETS)
+		return -EINVAL;
+
 	setbits_be32(priv->regs, BIT(rst->id));
 	mdelay(20);
 
 	return 0;
 }
 
-static int bcm6345_reset_free(struct reset_ctl *rst)
-{
-	return 0;
-}
-
-static int bcm6345_reset_request(struct reset_ctl *rst)
-{
-	if (rst->id >= MAX_RESETS)
-		return -EINVAL;
-
-	return bcm6345_reset_assert(rst);
-}
-
 struct reset_ops bcm6345_reset_reset_ops = {
-	.free = bcm6345_reset_free,
-	.request = bcm6345_reset_request,
 	.rst_assert = bcm6345_reset_assert,
 	.rst_deassert = bcm6345_reset_deassert,
 };
-- 
2.7.4



More information about the U-Boot mailing list