diff options
author | Jiancheng Xue <xuejiancheng@hisilicon.com> | 2016-11-30 09:03:32 +0800 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2017-01-09 10:38:58 +0100 |
commit | 5987b4bf512101137fa60c5c0ccac3db51541221 (patch) | |
tree | f3c10b55f13ffcd7daf1e9a17ab24331bc55ac6a /drivers/reset | |
parent | a121103c922847ba5010819a3f250f1f7fc84ab8 (diff) |
reset: ti_syscon: fix a ti_syscon_reset_status issue
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@hisilicon.com>
Fixes: cc7c2bb1493c ("reset: add TI SYSCON based reset driver")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset')
-rw-r--r-- | drivers/reset/reset-ti-syscon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c index 47f0ffd3b013..1799fd423901 100644 --- 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 reset_controller_dev *rcdev, 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 = { |