From patchwork Tue Jun 2 09:14:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 49353 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 074B72052D for ; Tue, 2 Jun 2015 09:16:58 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf40548763lbc.2 for ; Tue, 02 Jun 2015 02:16:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=RJnBfusuMo1mm/ZK16HMtws99KxLn7kJ9TbSCrB6WqI=; b=l83P2y96NAi2FWl410fp3Xve9plgN8RpFNgi1Ex9tPRyQ29jrgkVsy7zPyjdW1RWPh QTDmkvrj/PB2qPMYSw74trPNtYQdr/s3H1BunFtZEQziOK7tWXcYXNPbLjjplVnmbOVg OizWdmIgVW4Yasum2PSPkCI/3rg4hTs22bsII7HLCkm24Kzf/J8zreyrkvPw0sujPF4D 9ARmu9WFWZEgjLgUN5mu2j2ZX/3LE6uhlYOq3JEU1GB4h+Kmp21wyisNx7cUodUAMRzl SY76Dg4tDEj17tIMTNkpPRHnaVEsPT3rK+bGfgfHoh7LS8868XMlUPffECk8N9ccTr5g eIHQ== X-Gm-Message-State: ALoCoQmdRyLgZAQb8NAmg0v1cIUTZB9nOsu2AWI4szM0E7j/BQwav9deRseho9wSrUn2dSUMIpkj X-Received: by 10.152.37.101 with SMTP id x5mr24948536laj.5.1433236616879; Tue, 02 Jun 2015 02:16:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.67 with SMTP id da3ls827250lad.49.gmail; Tue, 02 Jun 2015 02:16:56 -0700 (PDT) X-Received: by 10.152.44.166 with SMTP id f6mr25236934lam.86.1433236616696; Tue, 02 Jun 2015 02:16:56 -0700 (PDT) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com. [2a00:1450:4010:c04::231]) by mx.google.com with ESMTPS id m5si14587601laj.3.2015.06.02.02.16.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 02:16:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::231 as permitted sender) client-ip=2a00:1450:4010:c04::231; Received: by lbcue7 with SMTP id ue7so100341079lbc.0 for ; Tue, 02 Jun 2015 02:16:56 -0700 (PDT) X-Received: by 10.112.234.200 with SMTP id ug8mr24716773lbc.117.1433236616373; Tue, 02 Jun 2015 02:16:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2914957lbb; Tue, 2 Jun 2015 02:16:55 -0700 (PDT) X-Received: by 10.70.62.6 with SMTP id u6mr47759564pdr.142.1433236614419; Tue, 02 Jun 2015 02:16:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oy6si25542974pdb.9.2015.06.02.02.16.53; Tue, 02 Jun 2015 02:16:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932302AbbFBJQl (ORCPT + 28 others); Tue, 2 Jun 2015 05:16:41 -0400 Received: from m50-110.126.com ([123.125.50.110]:43720 "EHLO m50-110.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756152AbbFBJQ3 (ORCPT ); Tue, 2 Jun 2015 05:16:29 -0400 Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp4 (Coremail) with SMTP id jdKowACn3mAJdG1Vs_0qAQ--.3424S4; Tue, 02 Jun 2015 17:15:01 +0800 (CST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Alessandro Zummo , Alexandre Belloni , John Stultz , Arnd Bergmann , Xunlei Pang Subject: [PATCH v2 3/4] drivers/rtc/interface.c: Remove rtc_set_mmss() Date: Tue, 2 Jun 2015 17:14:36 +0800 Message-Id: <1433236477-1724-3-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433236477-1724-1-git-send-email-xlpang@126.com> References: <1433236477-1724-1-git-send-email-xlpang@126.com> X-CM-TRANSID: jdKowACn3mAJdG1Vs_0qAQ--.3424S4 X-Coremail-Antispam: 1Uf129KBjvJXoWxWFy8Xr4xGw1kJF1Dtr48Crg_yoW5GryfpF 43CFy7Gr4UJrW2ga1DWwsruF45K3yjq3WxJFyFkw1Skr1FvF1rtFyxAr1xCFy5KFZ7Ca17 WF4rK398uw1UGaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jLOzxUUUUU= X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbirxUNv0X9wzF+-QAAsB Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: xlpang@126.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::231 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@; dmarc=fail (p=NONE dis=NONE) header.from=126.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Xunlei Pang Now rtc_set_mmss() has no users, just remove it. We still have rtc_set_time() doing similar things. Signed-off-by: Xunlei Pang --- drivers/rtc/interface.c | 45 --------------------------------------------- include/linux/rtc.h | 1 - 2 files changed, 46 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 166fc60..b511aa1 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -91,51 +91,6 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm) } EXPORT_SYMBOL_GPL(rtc_set_time); -int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs) -{ - int err; - - err = mutex_lock_interruptible(&rtc->ops_lock); - if (err) - return err; - - if (!rtc->ops) - err = -ENODEV; - else if (rtc->ops->set_mmss64) - err = rtc->ops->set_mmss64(rtc->dev.parent, secs); - else if (rtc->ops->set_mmss) - err = rtc->ops->set_mmss(rtc->dev.parent, secs); - else if (rtc->ops->read_time && rtc->ops->set_time) { - struct rtc_time new, old; - - err = rtc->ops->read_time(rtc->dev.parent, &old); - if (err == 0) { - rtc_time64_to_tm(secs, &new); - - /* - * avoid writing when we're going to change the day of - * the month. We will retry in the next minute. This - * basically means that if the RTC must not drift - * by more than 1 minute in 11 minutes. - */ - if (!((old.tm_hour == 23 && old.tm_min == 59) || - (new.tm_hour == 23 && new.tm_min == 59))) - err = rtc->ops->set_time(rtc->dev.parent, - &new); - } - } else { - err = -EINVAL; - } - - pm_stay_awake(rtc->dev.parent); - mutex_unlock(&rtc->ops_lock); - /* A timer might have just expired */ - schedule_work(&rtc->irqwork); - - return err; -} -EXPORT_SYMBOL_GPL(rtc_set_mmss); - static int rtc_read_alarm_internal(struct rtc_device *rtc, struct rtc_wkalrm *alarm) { int err; diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 13e4138..2e9b0e2 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -163,7 +163,6 @@ extern void devm_rtc_device_unregister(struct device *dev, extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); -extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); extern int rtc_set_ntp_time(struct timespec64 now); int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); extern int rtc_read_alarm(struct rtc_device *rtc,