@@ -18,6 +18,7 @@
#include <linux/clockchips.h>
#include <linux/mc146818rtc.h> /* for rtc_lock */
#include <linux/smp.h>
+#include <linux/platform_device.h>
#include <asm/clock.h>
#include <asm/rtc.h>
#include <asm/timer.h>
@@ -181,7 +182,12 @@ static struct sysdev_class timer_sysclas
static int __init timer_init_sysfs(void)
{
- int ret = sysdev_class_register(&timer_sysclass);
+ int ret;
+
+ if (!sys_timer)
+ return 0;
+
+ ret = sysdev_class_register(&timer_sysclass);
if (ret != 0)
return ret;
@@ -230,5 +236,8 @@ void __init time_init(void)
* initialized for us.
*/
sys_timer = get_sys_timer();
- printk(KERN_INFO "Using %s for system timer\n", sys_timer->name);
+ if (sys_timer)
+ pr_info("Using %s for system timer\n", sys_timer->name);
+ else
+ pr_warning("System timer missing, boot will fail.\n");
}