From patchwork Fri Jun 12 03:10:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 49782 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 885C120C81 for ; Fri, 12 Jun 2015 03:13:29 +0000 (UTC) Received: by lagh7 with SMTP id h7sf7056309lag.2 for ; Thu, 11 Jun 2015 20:13:28 -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=+MV3lCcSc29IIhDn9Thp6WBFr5d9TPWKqOKrJC5vuaw=; b=ESTZnI1DXPA8Nvve11VETt7kw1dMMqXPYKyvi7INFo/Xbx6h6AKi6K6dJ7ZsCXqN+2 6pojbxzRfNpJYJloScDRBPUvbOKBGbGtI3S3DMazjzezHEh4YVn45gFPkSUAq1Hntf/Q yHlHiBcWA/7wI0DOE6OkVNm7vTWgXOu7g4L980QC9Bn8joQhcBjZMO4O1sdvyX98jWkU gEVM4g9esm2Hjj6OCAH6eXAq5CVzARzMHmiagnHLNI301l5vMkrXrg8NGFqCVLIGa45X nGjpJXQ/SeO+zRrr2g5ovawOwg9L05/iBTP38mAQZaMYEXFBRPbRocjNDtx9v6rXQBgC 4C/A== X-Gm-Message-State: ALoCoQlz4B0Kaib9nEJjsjshhEBdKmvVQJMrJohKf5curQygYAw3cW9bfLuX9Opcg3gqFKUfXI1p X-Received: by 10.180.89.231 with SMTP id br7mr1727032wib.0.1434078808322; Thu, 11 Jun 2015 20:13:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.171 with SMTP id az11ls534389lab.107.gmail; Thu, 11 Jun 2015 20:13:28 -0700 (PDT) X-Received: by 10.112.126.42 with SMTP id mv10mr13298132lbb.58.1434078808115; Thu, 11 Jun 2015 20:13:28 -0700 (PDT) Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com. [2a00:1450:4010:c04::230]) by mx.google.com with ESMTPS id x5si2230267laj.129.2015.06.11.20.13.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 20:13:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::230 as permitted sender) client-ip=2a00:1450:4010:c04::230; Received: by lbbqq2 with SMTP id qq2so12514774lbb.3 for ; Thu, 11 Jun 2015 20:13:28 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr12816004lbc.112.1434078807966; Thu, 11 Jun 2015 20:13:27 -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 hn6csp242742lbb; Thu, 11 Jun 2015 20:13:26 -0700 (PDT) X-Received: by 10.70.36.10 with SMTP id m10mr13088593pdj.34.1434078805929; Thu, 11 Jun 2015 20:13:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si3387590pds.154.2015.06.11.20.13.25; Thu, 11 Jun 2015 20:13:25 -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 S1752607AbbFLDNM (ORCPT + 29 others); Thu, 11 Jun 2015 23:13:12 -0400 Received: from m50-111.126.com ([123.125.50.111]:54205 "EHLO m50-111.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751480AbbFLDNH (ORCPT ); Thu, 11 Jun 2015 23:13:07 -0400 Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp5 (Coremail) with SMTP id jtKowAAnbaa5TXpVUaYwAQ--.1090S4; Fri, 12 Jun 2015 11:11:10 +0800 (CST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Alessandro Zummo , Alexandre Belloni , John Stultz , Arnd Bergmann , "David S. Miller" , sparclinux@vger.kernel.org, Xunlei Pang Subject: [PATCH v3 3/3] drivers/rtc/interface.c: Remove rtc_set_mmss() Date: Fri, 12 Jun 2015 11:10:18 +0800 Message-Id: <1434078618-16373-3-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434078618-16373-1-git-send-email-xlpang@126.com> References: <1434078618-16373-1-git-send-email-xlpang@126.com> X-CM-TRANSID: jtKowAAnbaa5TXpVUaYwAQ--.1090S4 X-Coremail-Antispam: 1Uf129KBjvJXoWxWFy8Xr4xGw1kJF1Dtr48Crg_yoW5GryfpF 43CFy3Gr4UJrW7Wa1DWwsrZF45Kw4jq3WxJFyFkw1Skr1FvF1rtFyxAr1xCFy5KFZ7Ca17 WF4rK398uw1UGaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j6xRDUUUUU= X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbiWw4Xv1PM85-94gAAsR 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::230 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@126.com; 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 f46f765..f9c76a8 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -169,7 +169,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,