[U-Boot] [PATCHv1 09/14] reset: sandbox: remove request and free functions

Dinh Nguyen dinguyen at kernel.org
Sat Apr 14 18:51:35 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/sandbox-reset.c | 25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c
index c310749..a75143f 100644
--- a/drivers/reset/sandbox-reset.c
+++ b/drivers/reset/sandbox-reset.c
@@ -20,29 +20,15 @@ struct sandbox_reset {
 	struct sandbox_reset_signal signals[SANDBOX_RESET_SIGNALS];
 };
 
-static int sandbox_reset_request(struct reset_ctl *reset_ctl)
-{
-	debug("%s(reset_ctl=%p)\n", __func__, reset_ctl);
-
-	if (reset_ctl->id >= SANDBOX_RESET_SIGNALS)
-		return -EINVAL;
-
-	return 0;
-}
-
-static int sandbox_reset_free(struct reset_ctl *reset_ctl)
-{
-	debug("%s(reset_ctl=%p)\n", __func__, reset_ctl);
-
-	return 0;
-}
-
 static int sandbox_reset_assert(struct reset_ctl *reset_ctl)
 {
 	struct sandbox_reset *sbr = dev_get_priv(reset_ctl->dev);
 
 	debug("%s(reset_ctl=%p)\n", __func__, reset_ctl);
 
+	if (reset_ctl->id >= SANDBOX_RESET_SIGNALS)
+		return -EINVAL;
+
 	sbr->signals[reset_ctl->id].asserted = true;
 
 	return 0;
@@ -54,6 +40,9 @@ static int sandbox_reset_deassert(struct reset_ctl *reset_ctl)
 
 	debug("%s(reset_ctl=%p)\n", __func__, reset_ctl);
 
+	if (reset_ctl->id >= SANDBOX_RESET_SIGNALS)
+		return -EINVAL;
+
 	sbr->signals[reset_ctl->id].asserted = false;
 
 	return 0;
@@ -79,8 +68,6 @@ static const struct udevice_id sandbox_reset_ids[] = {
 };
 
 struct reset_ops sandbox_reset_reset_ops = {
-	.request = sandbox_reset_request,
-	.free = sandbox_reset_free,
 	.rst_assert = sandbox_reset_assert,
 	.rst_deassert = sandbox_reset_deassert,
 };
-- 
2.7.4



More information about the U-Boot mailing list