rtc-ds1307: typo fix found by coverity
authorDavid Brownell <david-b@pacbell.net>
Thu, 26 Jul 2007 17:41:00 +0000 (10:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 26 Jul 2007 18:35:16 +0000 (11:35 -0700)
Fix a typo turned up by a Coverity check:  referring to the wrong register,
which could cause problems with DS1338 RTCs whose oscillators halted.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-ds1307.c

index 5158a62..db6f3f0 100644 (file)
@@ -352,7 +352,7 @@ read_rtc:
                /* oscillator fault?  clear flag, and warn */
                if (ds1307->regs[DS1307_REG_CONTROL] & DS1338_BIT_OSF) {
                        i2c_smbus_write_byte_data(client, DS1307_REG_CONTROL,
-                                       ds1307->regs[DS1337_REG_CONTROL]
+                                       ds1307->regs[DS1307_REG_CONTROL]
                                        & ~DS1338_BIT_OSF);
                        dev_warn(&client->dev, "SET TIME!\n");
                        goto read_rtc;