lkml.org 
[lkml]   [2008]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [linux-pm] sleepy linux self-test
Date
On Wednesday 30 January 2008, Pavel Machek wrote:

> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c
> @@ -78,7 +78,7 @@ static inline int is_intr(u8 rtc_intr)
>
> /*----------------------------------------------------------------*/
>
> -static int cmos_read_time(struct device *dev, struct rtc_time *t)
> +int cmos_read_time(struct device *dev, struct rtc_time *t)
> {
>
> ... etc ...

You should be using the standard RTC library calls, exported
from drivers/rtc/interface.c ... and making sure this mechanism
will work with any wakeup-capable RTC. Otherwise you'll end
being needlessly x86-specific, or reinventing those calls.

Plus, the way you're doing it now is violating the locking
protocol used by that driver.

- Dave


\
 
 \ /
  Last update: 2008-02-01 02:59    [W:0.161 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site