summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock-rtc.c
diff options
context:
space:
mode:
authorSami Kerola2016-07-17 12:30:40 +0200
committerSami Kerola2017-02-05 00:39:37 +0100
commitc6ea9ef6cbe3a7ec38f550b18239fc1b27eb5e41 (patch)
treec4a3a463b095221dba5a444e34a53babde549675 /sys-utils/hwclock-rtc.c
parenthwclock: move error messages to determine_clock_access_method() (diff)
downloadkernel-qcow2-util-linux-c6ea9ef6cbe3a7ec38f550b18239fc1b27eb5e41.tar.gz
kernel-qcow2-util-linux-c6ea9ef6cbe3a7ec38f550b18239fc1b27eb5e41.tar.xz
kernel-qcow2-util-linux-c6ea9ef6cbe3a7ec38f550b18239fc1b27eb5e41.zip
hwclock: remove dead code and other minor fixes
Use #ifdef rather than #if to avoid undefined preprocessor identifier warning. Remove dead code. The #if 0 ensured the code has not been used for long time, which is good because the linux/mc146818rtc.h is not been part of user-api for long time. Value of the adjtime_p->last_calib_time is checked if it has value of zero, so testing none-zero bit later is necessarily true, and therefore does not need to be checked. And at the and remove unnecessary boolean variable. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/hwclock-rtc.c')
-rw-r--r--sys-utils/hwclock-rtc.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/sys-utils/hwclock-rtc.c b/sys-utils/hwclock-rtc.c
index 8dd47092f..b974cc2aa 100644
--- a/sys-utils/hwclock-rtc.c
+++ b/sys-utils/hwclock-rtc.c
@@ -53,18 +53,6 @@ struct sparc_rtc_time
#define RTCGET _IOR('p', 20, struct sparc_rtc_time)
#define RTCSET _IOW('p', 21, struct sparc_rtc_time)
-/* non-sparc stuff */
-#if 0
-# include <linux/version.h>
-/*
- * Check if the /dev/rtc interface is available in this version of the
- * system headers. 131072 is linux 2.0.0.
- */
-# if LINUX_VERSION_CODE >= 131072
-# include <linux/mc146818rtc.h>
-# endif
-#endif
-
/*
* struct rtc_time is present since 1.3.99.
* Earlier (since 1.3.89), a struct tm was used.