From patchwork Fri May 29 14:46:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 49220 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 54696218E7 for ; Fri, 29 May 2015 14:48:33 +0000 (UTC) Received: by wgv5 with SMTP id 5sf14576718wgv.0 for ; Fri, 29 May 2015 07:48:32 -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=K3xpzUG0jM8/XpSbWewdTREu0qjBI5MVDrIl5ipMghg=; b=lBgLl9cK+jUETWrFPeO3IohX5rpI+A7cjtvpLa37130+yV7Ogd1BeYqPx/gO4aTnuO iJTgdsrH3bn+2Hyyz/gKzzDsIuAbSTinZ7t46qz4k61WYpJ0hWqwuebt9cJ0grzTUdxT W/jpAN17Xw+3i18FjPb0T6jPOyJyIpw4/Q3lGteT06rL5bRKTUoXMKiNYDH3d8VPXkOr /PCcGPdTCdpX6senkKdNlOQ85VzWdrmcDjCMvIp+7fIuvBRgJIMddLHjdoBJYxKoTJQ5 hz03QJ0IIABbvhYiJ9VLJTUoDXdMuNKZDcBtlsCXRjHeYzC53XqppSxrosvVQAtZIKbH SwAw== X-Gm-Message-State: ALoCoQnaKLCMF9CzfOh04SrdSXdxY46Yecw6+ni+eFeBAhEFaQGsJrT0hRIdKIV+FSbjDIEL7vbs X-Received: by 10.194.143.98 with SMTP id sd2mr7531868wjb.6.1432910912663; Fri, 29 May 2015 07:48:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.10 with SMTP id p10ls379418lag.29.gmail; Fri, 29 May 2015 07:48:32 -0700 (PDT) X-Received: by 10.112.130.129 with SMTP id oe1mr8143191lbb.37.1432910912464; Fri, 29 May 2015 07:48:32 -0700 (PDT) Received: from mail-la0-x231.google.com (mail-la0-x231.google.com. [2a00:1450:4010:c03::231]) by mx.google.com with ESMTPS id pf2si4883895lbc.2.2015.05.29.07.48.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 07:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::231 as permitted sender) client-ip=2a00:1450:4010:c03::231; Received: by labko7 with SMTP id ko7so53988333lab.2 for ; Fri, 29 May 2015 07:48:32 -0700 (PDT) X-Received: by 10.153.6.36 with SMTP id cr4mr8527766lad.56.1432910912350; Fri, 29 May 2015 07:48:32 -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 hn6csp393728lbb; Fri, 29 May 2015 07:48:31 -0700 (PDT) X-Received: by 10.70.90.162 with SMTP id bx2mr15586085pdb.60.1432910910287; Fri, 29 May 2015 07:48:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nn1si8700821pdb.231.2015.05.29.07.48.29; Fri, 29 May 2015 07:48:30 -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 S1756372AbbE2OsY (ORCPT + 28 others); Fri, 29 May 2015 10:48:24 -0400 Received: from m50-111.126.com ([123.125.50.111]:44818 "EHLO m50-111.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755020AbbE2OsM (ORCPT ); Fri, 29 May 2015 10:48:12 -0400 Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp5 (Coremail) with SMTP id jtKowAAHLTLCe2hVnOL+AA--.2718S4; Fri, 29 May 2015 22:46:53 +0800 (CST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Alessandro Zummo , John Stultz , Arnd Bergmann , "David S. Miller" , sparclinux@vger.kernel.org, linux-cris-kernel@axis.com, Mikael Starvik , Jesper Nilsson , Xunlei Pang Subject: [PATCH v2 3/4] drivers/rtc/interface.c: Remove rtc_set_mmss() Date: Fri, 29 May 2015 22:46:17 +0800 Message-Id: <1432910778-314-3-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432910778-314-1-git-send-email-xlpang@126.com> References: <1432910778-314-1-git-send-email-xlpang@126.com> X-CM-TRANSID: jtKowAAHLTLCe2hVnOL+AA--.2718S4 X-Coremail-Antispam: 1Uf129KBjvJXoWxWFy8Xr4xGw1kJF1Dtr48Crg_yoW5GryfpF 43CFy7Gr4UJrW7Wa1DWwsrZF45K3yjqa4xJFyFkw1Skr1FvF1rtFyxAr1xCFy5KFZ7Ca17 WF4rK398uw1UGaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jSApnUUUUU= X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbiJwIJv01sB8dHfgAAsL 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:c03::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 8dcf682..e8f2c3c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -161,7 +161,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,