[U-Boot] [PATCHv1 14/14] reset: remove request and free functions
Dinh Nguyen
dinguyen at kernel.org
Sat Apr 14 18:51:40 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-uclass.c | 28 ----------------------------
include/reset-uclass.h | 21 ---------------------
include/reset.h | 23 -----------------------
3 files changed, 72 deletions(-)
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index 9a5c9c9..24dd48c 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -72,12 +72,6 @@ int reset_get_by_index(struct udevice *dev, int index,
return ret;
}
- ret = ops->request(reset_ctl);
- if (ret) {
- debug("ops->request() failed: %d\n", ret);
- return ret;
- }
-
return 0;
}
@@ -133,24 +127,6 @@ int reset_get_by_name(struct udevice *dev, const char *name,
return reset_get_by_index(dev, index, reset_ctl);
}
-int reset_request(struct reset_ctl *reset_ctl)
-{
- struct reset_ops *ops = reset_dev_ops(reset_ctl->dev);
-
- debug("%s(reset_ctl=%p)\n", __func__, reset_ctl);
-
- return ops->request(reset_ctl);
-}
-
-int reset_free(struct reset_ctl *reset_ctl)
-{
- struct reset_ops *ops = reset_dev_ops(reset_ctl->dev);
-
- debug("%s(reset_ctl=%p)\n", __func__, reset_ctl);
-
- return ops->free(reset_ctl);
-}
-
int reset_assert(struct reset_ctl *reset_ctl)
{
struct reset_ops *ops = reset_dev_ops(reset_ctl->dev);
@@ -209,10 +185,6 @@ int reset_release_all(struct reset_ctl *reset_ctl, int count)
ret = reset_assert(&reset_ctl[i]);
if (ret)
return ret;
-
- ret = reset_free(&reset_ctl[i]);
- if (ret)
- return ret;
}
return 0;
diff --git a/include/reset-uclass.h b/include/reset-uclass.h
index 50fbeb1..a6301cf 100644
--- a/include/reset-uclass.h
+++ b/include/reset-uclass.h
@@ -40,27 +40,6 @@ struct reset_ops {
int (*of_xlate)(struct reset_ctl *reset_ctl,
struct ofnode_phandle_args *args);
/**
- * request - Request a translated reset control.
- *
- * The reset core calls this function as the second step in
- * implementing a client's reset_get_by_*() call, following a
- * successful xxx_xlate() call.
- *
- * @reset_ctl: The reset control struct to request; this has been
- * filled in by a previoux xxx_xlate() function call.
- * @return 0 if OK, or a negative error code.
- */
- int (*request)(struct reset_ctl *reset_ctl);
- /**
- * free - Free a previously requested reset control.
- *
- * This is the implementation of the client reset_free() API.
- *
- * @reset_ctl: The reset control to free.
- * @return 0 if OK, or a negative error code.
- */
- int (*free)(struct reset_ctl *reset_ctl);
- /**
* rst_assert - Assert a reset signal.
*
* Note: This function is named rst_assert not assert to avoid
diff --git a/include/reset.h b/include/reset.h
index d38f176..505de77 100644
--- a/include/reset.h
+++ b/include/reset.h
@@ -134,24 +134,6 @@ int reset_get_by_name(struct udevice *dev, const char *name,
struct reset_ctl *reset_ctl);
/**
- * reset_request - Request a reset signal.
- *
- * @reset_ctl: A reset control struct.
- *
- * @return 0 if OK, or a negative error code.
- */
-int reset_request(struct reset_ctl *reset_ctl);
-
-/**
- * reset_free - Free a previously requested reset signal.
- *
- * @reset_ctl: A reset control struct that was previously successfully
- * requested by reset_get_by_*().
- * @return 0 if OK, or a negative error code.
- */
-int reset_free(struct reset_ctl *reset_ctl);
-
-/**
* reset_assert - Assert a reset signal.
*
* This function will assert the specified reset signal, thus resetting the
@@ -254,11 +236,6 @@ static inline int reset_get_by_name(struct udevice *dev, const char *name,
return -ENOTSUPP;
}
-static inline int reset_free(struct reset_ctl *reset_ctl)
-{
- return 0;
-}
-
static inline int reset_assert(struct reset_ctl *reset_ctl)
{
return 0;
--
2.7.4
More information about the U-Boot
mailing list