Google
  Web www.spinics.net

Re: ARM rtc problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, Apr 16, 2007 at 02:24:14PM +0530, Manish RATHI wrote:
> Hi,
> To set a alarm thru rtc, ioctl RTC_ALM_SET is used.
> In above ioctl implementation, in file arm/common/rtctime.c , alrm structure is initialized
> As follows:
> 
>       alrm.enabled = 0;
>                 alrm.pending = 0;
>                 alrm.time.tm_mday = -1;
>                 alrm.time.tm_mon = -1;
>                 alrm.time.tm_year = -1;
>                 alrm.time.tm_wday = -1;
>                 alrm.time.tm_yday = -1;
>                 alrm.time.tm_isdst = -1;
>                 ret = rtc_set_alarm(ops, &alrm);
> 
>  alrm is time at which alarm should be matured. 
> Why this structure is filled with invalid values?
> I think that this should not be initialized with invalid values.

-1 is a wildcard - the RTC_ALM_SET call only sets the time of day when
the alarm fires (since that's the behaviour of MC146818 RTCs which is
where this ioctl came from).

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux ARM Kernel]     [Linux MIPS]     [ECOS]     [Tools]     [DDR & Rambus]     [Monitors]

Powered by Linux