summaryrefslogtreecommitdiffstats
path: root/drivers/reset
diff options
context:
space:
mode:
authorJiancheng Xue <xuejiancheng@hisilicon.com>2016-11-30 02:03:32 +0100
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-01-09 10:38:58 +0100
commit5987b4bf512101137fa60c5c0ccac3db51541221 (patch)
treef3c10b55f13ffcd7daf1e9a17ab24331bc55ac6a /drivers/reset
parentLinux 4.10-rc3 (diff)
downloadlinux-5987b4bf512101137fa60c5c0ccac3db51541221.tar.xz
linux-5987b4bf512101137fa60c5c0ccac3db51541221.zip
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.c4
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 = {