[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171006083843.590733683@linuxfoundation.org>
Date: Fri, 6 Oct 2017 10:50:57 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jiancheng Xue <xuejiancheng@...ilicon.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sasha Levin <alexander.levin@...izon.com>
Subject: [PATCH 4.9 019/104] reset: ti_syscon: fix a ti_syscon_reset_status issue
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiancheng Xue <xuejiancheng@...ilicon.com>
[ Upstream commit 5987b4bf512101137fa60c5c0ccac3db51541221 ]
If STATUS_SET was not set, ti_syscon_reset_status would always return 0
no matter whether the status_bit was set or not.
Signed-off-by: Jiancheng Xue <xuejiancheng@...ilicon.com>
Fixes: cc7c2bb1493c ("reset: add TI SYSCON based reset driver")
Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/reset/reset-ti-syscon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/reset/reset-ti-syscon.c
+++ b/drivers/reset/reset-ti-syscon.c
@@ -154,8 +154,8 @@ static int ti_syscon_reset_status(struct
if (ret)
return ret;
- return (reset_state & BIT(control->status_bit)) &&
- (control->flags & STATUS_SET);
+ return !(reset_state & BIT(control->status_bit)) ==
+ !(control->flags & STATUS_SET);
}
static struct reset_control_ops ti_syscon_reset_ops = {
Powered by blists - more mailing lists