rtc: rx8025: fix RX8025_BIT_CTRL2_CTFG initialization
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 4 Aug 2015 09:24:33 +0000 (11:24 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 11:19:12 +0000 (13:19 +0200)
RX8025_BIT_CTRL2_CTFG was set to 0 only when it was already 0.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-rx8025.c

index f9b86b92943ff499292e9c20ad9e35e416c349bf..f3f1de26c22837ece55f89efa15483c28b2876bd 100644 (file)
@@ -270,7 +270,7 @@ static int rx8025_init_client(struct i2c_client *client)
                need_clear = 1;
        }
 
-       if (!(ctrl[1] & RX8025_BIT_CTRL2_CTFG))
+       if (ctrl[1] & RX8025_BIT_CTRL2_CTFG)
                need_clear = 1;
 
        if (need_clear) {