mfd: wm8350 tries reaches -1
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 4 Feb 2009 20:23:22 +0000 (21:23 +0100)
committerSamuel Ortiz <samuel@sortiz.org>
Tue, 17 Feb 2009 08:00:13 +0000 (09:00 +0100)
With a postfix decrement tries will reach -1 rather than 0,
so the warning will not be issued even upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
drivers/mfd/wm8350-core.c

index e5e82c7cc5236a3ceee7e787cabe94edef284cbc..ea3801833176a32b001eddbbf43212b2ee9e9334 100644 (file)
@@ -1111,7 +1111,7 @@ int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale, int vref)
        do {
                schedule_timeout_interruptible(1);
                reg = wm8350_reg_read(wm8350, WM8350_DIGITISER_CONTROL_1);
-       } while (tries-- && (reg & WM8350_AUXADC_POLL));
+       } while (--tries && (reg & WM8350_AUXADC_POLL));
 
        if (!tries)
                dev_err(wm8350->dev, "adc chn %d read timeout\n", channel);