summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-07-26 19:41:00 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-26 20:35:16 +0200
commitbd16f9ebd083b965dcdfb6b762e206374d5b823b (patch)
tree2fd41468f9f7d1c9191a6260d6e7d6b1d2c89f71 /drivers/rtc
parentfixup s3c24xx build after arch moves (diff)
downloadlinux-bd16f9ebd083b965dcdfb6b762e206374d5b823b.tar.xz
linux-bd16f9ebd083b965dcdfb6b762e206374d5b823b.zip
rtc-ds1307: typo fix found by coverity
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>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-ds1307.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 5158a625671f..db6f3f0d8982 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -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;