summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-mc146818-lib.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-02-11 00:30:12 +0300
committerDavid S. Miller <davem@davemloft.net>2021-02-11 00:30:12 +0300
commitdc9d87581d464e7b7d38853d6904b70b6c920d99 (patch)
tree15aa27fefb867814899c0a0c194adf327675ba10 /drivers/rtc/rtc-mc146818-lib.c
parentde1db4a6ed6241e34cab0e5059d4b56f6bae39b9 (diff)
parent291009f656e8eaebbdfd3a8d99f6b190a9ce9deb (diff)
downloadlinux-dc9d87581d464e7b7d38853d6904b70b6c920d99.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'drivers/rtc/rtc-mc146818-lib.c')
-rw-r--r--drivers/rtc/rtc-mc146818-lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-mc146818-lib.c b/drivers/rtc/rtc-mc146818-lib.c
index f83c13818af3..dcfaf09946ee 100644
--- a/drivers/rtc/rtc-mc146818-lib.c
+++ b/drivers/rtc/rtc-mc146818-lib.c
@@ -21,8 +21,8 @@ unsigned int mc146818_get_time(struct rtc_time *time)
again:
spin_lock_irqsave(&rtc_lock, flags);
- /* Ensure that the RTC is accessible. Bit 0-6 must be 0! */
- if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x7f) != 0)) {
+ /* Ensure that the RTC is accessible. Bit 6 must be 0! */
+ if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x40) != 0)) {
spin_unlock_irqrestore(&rtc_lock, flags);
memset(time, 0xff, sizeof(*time));
return 0;