Message ID | 4982D982.5020302@gmail.com |
---|---|
State | Accepted, archived |
Headers | show |
On Fri, Jan 30, 2009 at 11:42:10AM +0100, Roel Kluin wrote: > Mark Brown wrote: > > On Thu, Jan 29, 2009 at 04:45:57PM +0100, Roel Kluin wrote: > > > >> With a postfix decrement retries will reach -1 rather than 0, > >> so the warning and error-out will not occur. > > > >> Signed-off-by: Roel Kluin <roel.kluin@gmail.com> > > > > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> > I missed another in the same file (the second hunk) Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. -~----------~----~----~----~------~----~------~--~---
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c index 5c5e3aa..8c73785 100644 --- a/drivers/rtc/rtc-wm8350.c +++ b/drivers/rtc/rtc-wm8350.c @@ -122,7 +122,7 @@ static int wm8350_rtc_settime(struct device *dev, struct rtc_time *tm) do { rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); schedule_timeout_uninterruptible(msecs_to_jiffies(1)); - } while (retries-- && !(rtc_ctrl & WM8350_RTC_STS)); + } while (--retries && !(rtc_ctrl & WM8350_RTC_STS)); if (!retries) { dev_err(dev, "timed out on set confirmation\n"); @@ -440,7 +440,7 @@ static int wm8350_rtc_probe(struct platform_device *pdev) do { timectl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); - } while (timectl & WM8350_RTC_STS && retries--); + } while (timectl & WM8350_RTC_STS && --retries); if (retries == 0) { dev_err(&pdev->dev, "failed to start: timeout\n");