diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 9531845..d662b8d 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -181,7 +181,7 @@ void rtc_timer_do_work(struct work_struct *work);

static inline bool is_leap_year(unsigned int year)
{
-    return (!(year % 4) && (year % 100)) || !(year % 400);
+    return !(year & 0x3);
}

#ifdef CONFIG_RTC_HCTOSYS_DEVICE
