|
From: Paul M. <le...@us...> - 2006-08-03 06:55:18
|
Update of /cvsroot/linuxsh/linux/arch/sh/kernel In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11035/arch/sh/kernel Modified Files: time.c Log Message: Kill CONFIG_SH_RTC, we tie in to the generic RTC subsystem now. Index: time.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/time.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- time.c 7 Jul 2006 10:45:05 -0000 1.38 +++ time.c 3 Aug 2006 06:55:14 -0000 1.39 @@ -3,13 +3,12 @@ * * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka * Copyright (C) 2000 Philipp Rumpf <pr...@tu...> - * Copyright (C) 2002, 2003, 2004, 2005 Paul Mundt + * Copyright (C) 2002 - 2006 Paul Mundt * Copyright (C) 2002 M. R. Brown <mr...@li...> * * Some code taken from i386 version. * Copyright (C) 1991, 1992, 1995 Linus Torvalds */ - #include <linux/config.h> #include <linux/kernel.h> #include <linux/module.h> @@ -27,15 +26,20 @@ DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL(rtc_lock); -/* XXX: Can we initialize this in a routine somewhere? Dreamcast doesn't want - * these routines anywhere... */ -#ifdef CONFIG_SH_RTC -void (*rtc_sh_get_time)(struct timespec *) = sh_rtc_gettimeofday; -int (*rtc_sh_set_time)(const time_t) = sh_rtc_settimeofday; -#else -void (*rtc_sh_get_time)(struct timespec *); -int (*rtc_sh_set_time)(const time_t); -#endif +/* Dummy RTC ops */ +static void null_rtc_get_time(struct timespec *tv) +{ + tv->tv_sec = mktime(2000, 1, 1, 0, 0, 0); + tv->tv_nsec = 0; +} + +static int null_rtc_set_time(const time_t secs) +{ + return 0; +} + +void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time; +int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; /* * Scheduler clock - returns current time in nanosec units. @@ -71,7 +75,6 @@ tv->tv_sec = sec; tv->tv_usec = usec; } - EXPORT_SYMBOL(do_gettimeofday); int do_settimeofday(struct timespec *tv) @@ -104,7 +107,6 @@ return 0; } - EXPORT_SYMBOL(do_settimeofday); /* last time the RTC clock got updated */ |