summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xztdummy.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ztdummy.c b/ztdummy.c
index e24ae93..d15bd1f 100755
--- a/ztdummy.c
+++ b/ztdummy.c
@@ -100,7 +100,7 @@ static int debug = 0;
/* New 2.6 kernel timer stuff */
static struct timer_list timer;
#if HZ != 1000
-#error ztdummy requires 1000 hz jiffies
+#warning This module will not be usable since the kernel HZ setting is not 1000 ticks per second.
#endif
#endif
#else
@@ -220,6 +220,13 @@ int init_module(void)
}
#endif
+#if defined(LINUX26) && !defined(USE_RTC)
+ if (HZ != 1000) {
+ printk("ztdummy: This module requires the kernel HZ setting to be 1000 ticks per second\n");
+ return -ENODEV;
+ }
+#endif /* defined(LINUX26) && !defined(USE_RTC) */
+
ztd = kmalloc(sizeof(struct ztdummy), GFP_KERNEL);
if (ztd == NULL) {
printk("ztdummy: Unable to allocate memory\n");