lkml.org 
[lkml]   [2003]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [pm] fix time after suspend-to-*
Hi!

> > +static int pit_resume(struct sys_device *dev)
> > +{
> > + if (got_clock_diff) { /* Must know time zone in order to set clock */
> > + xtime.tv_sec = get_cmos_time() + clock_cmos_diff;
> > + xtime.tv_nsec = 0;
> > + }
> > + return 0;
> > +}
> > +
...
> Forgive me, I'm not totally familiar w/ the sysfs/pm stuff, but normally
> you need to have the xtime_lock to safely manipulate xtime. Also,
> couldn't you just call settimeofday() instead? The bit about manually
> setting the timezone also confuses me, as we don't normally do this at
> bootup in the kernel.
>

I took it straight from apm.c... But it is well possible that it needs
some locking. OTOH this runs with interrupts disabled, perhaps
thats enough?
Pavel
--
Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.050 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site