Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532887
| From | Jiancheng Xue <xuejiancheng@hisilicon.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue |
| Date | 2016-11-30 02:30 +0100 |
| Message-ID | <sJ1SF-7Ky-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
Change Log
v2:
- Refined this patch according to the suggestion from Andrew F. Davis.
drivers/reset/reset-ti-syscon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c
index 47f0ffd..1799fd4 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 = {
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue Jiancheng Xue <xuejiancheng@hisilicon.com> - 2016-11-30 02:30 +0100 Re: [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue Philipp Zabel <p.zabel@pengutronix.de> - 2016-11-30 11:10 +0100
csiph-web