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

Message ID 1523731900-4675-7-git-send-email-dinguyen@kernel.org
State New
Delegated to: Tom Rini
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-bcm6345.c | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

Patch

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