From: Jiancheng Xue Date: Wed, 30 Nov 2016 01:03:32 +0000 (+0800) Subject: reset: ti_syscon: fix a ti_syscon_reset_status issue X-Git-Tag: v4.11-rc1~85^2~13^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5987b4bf512101137fa60c5c0ccac3db51541221;p=karo-tx-linux.git 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 Fixes: cc7c2bb1493c ("reset: add TI SYSCON based reset driver") Signed-off-by: Philipp Zabel --- 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 = {