Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752809Ab1BCVIL (ORCPT ); Thu, 3 Feb 2011 16:08:11 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:43316 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752764Ab1BCVIK (ORCPT ); Thu, 3 Feb 2011 16:08:10 -0500 MIME-Version: 1.0 In-Reply-To: <1296760576.3336.324.camel@work-vm> References: <1296699283-6784-1-git-send-email-john.stultz@linaro.org> <1296760576.3336.324.camel@work-vm> From: Marcelo Roberto Jimenez Date: Thu, 3 Feb 2011 18:31:37 -0200 Message-ID: Subject: Re: [PATCH 0/4] RTC regression fixups To: John Stultz Cc: linux-kernel@vger.kernel.org, Alessandro Zummo , Thomas Gleixner Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 994 Lines: 33 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. -- 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/