lkml.org 
[lkml]   [2011]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/4] RTC regression fixups
Hi John,

Currently, the RTC driver _must_ declare the read_alarm() callback,
even if it does nothing. But the code in drivers/rtc/interface.c does

if (rtc->ops == NULL)
err = -ENODEV;
else if (!rtc->ops->read_alarm)
err = -EINVAL;
else {
memset(alarm, 0, sizeof(struct rtc_wkalrm));
alarm->enabled = rtc->aie_timer.enabled;
alarm->time = rtc_ktime_to_tm(rtc->aie_timer.node.expires);
}

The read_alarm() callback is not being performed.

Two questions:

1 - Should the callback be removed or should it be kept and called in
the else part?

2 - In case we are keeping it, should it be enforced like it is now,
or should it be kept optional? I'd rather have it optional, that means
less useless code in the drivers.

Regards,
Marcelo.


\
 
 \ /
  Last update: 2011-02-03 22:11    [W:0.044 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site