| Age | Commit message (Collapse) | Author |
|
|
|
get_rtc_time, in the case that PDC returns that the battery is bad, returns
an unmodified rtc_time arg to the caller, which then uses uninitialized
values. Fix this by memset-ing the arg with zeroes, so it will at least be
cleared if we return failure.
Spotted by John David Anglin.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
|
|
Many files include the filename at the beginning, serveral used a wrong one.
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
|
|
From: Geert Uytterhoeven <geert@linux-m68k.org>
It updates include/asm-{generic,parisc}/rtc.h for the recent changes in
drivers/char/genrtc.c and include/asm-{m68k,ppc}/rtc.h.
get_rtc_time() now returns some RTC flags instead of a 0/-1 success/failure
indicator. These flags include:
- RTC_BATT_BAD: RTC battery is bad (can be detected on PA-RISC)
- RTC_24H: Clock runs in 24 hour mode
Most of these flags are the same as drivers/char/rtc.c, but RTC_BATT_BAD is a
new one.
|
|
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.
|