[PATCH] A generic RTC driver [3/3]
This is part 3 of 3 of the genrtc patches. This is my own slight bit of work, as well as some work by Randolph Chung. This changes set_rtc_time(struct *rtc_time) to return an int instead of void. This was done so that the arch-specific code here could do additional checks on the time and return an error if needed. This then introduces include/asm-generic/rtc.h, include/asm-i386/rtc.h and include/asm-alpha/rtc.h. include/asm-generic/rtc.h contains the get_rtc_time and set_rtc_time logic that is in drivers/char/rtc.c and has been tested on SMP i386. This also modifies include/asm-ppc/rtc.h to return -ENODEV if no rtc hardware is present. Additionally, Dave Jones pointed out to me a place where we might not be safe when jiffies wraps, so this switches that to time_after(). From Randolph Chung, support for a 64bit kernel and a 32bit userland.
Showing
include/asm-alpha/rtc.h
0 → 100644
include/asm-generic/rtc.h
0 → 100644
include/asm-i386/rtc.h
0 → 100644
include/asm-parisc/rtc.h
0 → 100644
Please register or sign in to comment