[U-Boot] [PATCHv1 05/14] reset: meson: remove request and free functions

Dinh Nguyen
2018-04-14T18:51:31Z

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-meson.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index 5324f86..8bbaa6c 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -20,19 +20,6 @@ struct meson_reset_priv {
struct regmap *regmap;
};

-static int meson_reset_request(struct reset_ctl *reset_ctl)
-{
- if (reset_ctl->id > (REG_COUNT * BITS_PER_REG))
- return -EINVAL;
-
- return 0;
-}
-
-static int meson_reset_free(struct reset_ctl *reset_ctl)
-{
- return 0;
-}
-
static int meson_reset_level(struct reset_ctl *reset_ctl, bool assert)
{
struct meson_reset_priv *priv = dev_get_priv(reset_ctl->dev);
@@ -41,6 +28,9 @@ static int meson_reset_level(struct reset_ctl *reset_ctl, bool assert)
uint reg_offset = LEVEL_OFFSET + (bank << 2);
uint val;

+ if (reset_ctl->id > (REG_COUNT * BITS_PER_REG))
+ return -EINVAL;
+
regmap_read(priv->regmap, reg_offset, &val);
if (assert)
val &= ~BIT(offset);
@@ -62,8 +52,6 @@ static int meson_reset_deassert(struct reset_ctl *reset_ctl)
}

struct reset_ops meson_reset_ops = {
- .request = meson_reset_request,
- .free = meson_reset_free,
.rst_assert = meson_reset_assert,
.rst_deassert = meson_reset_deassert,
};
--
2.7.4