Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0a67c37 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alexandre Belloni
Browse files

rtc: rtc-nuc900: fix loop timeout test



We should change this post-op to a pre-op because we want the loop to
exit with "timeout" set to zero.

Fixes: 0a89b553 ("nuc900/rtc: change the waiting for device ready implement")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 1d61d259
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ static int *check_rtc_access_enable(struct nuc900_rtc *nuc900_rtc)
	__raw_writel(AERPOWERON, nuc900_rtc->rtc_reg + REG_RTC_AER);

	while (!(__raw_readl(nuc900_rtc->rtc_reg + REG_RTC_AER) & AERRWENB)
								&& timeout--)
								&& --timeout)
		mdelay(1);

	if (!timeout)