From patchwork Tue Jun 20 09:35:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 105951 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1274869qgd; Tue, 20 Jun 2017 02:38:11 -0700 (PDT) X-Received: by 10.98.61.88 with SMTP id k85mr29524400pfa.90.1497951491762; Tue, 20 Jun 2017 02:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497951491; cv=none; d=google.com; s=arc-20160816; b=jmWlHr2Fist7HX7BmEUplNk1LccHFl2ZZnQD6j6dXFo8TJvPAh84F0+dkh3lYiugy4 2bcHbiVdyf8krbFNnzvO6TOtzWhzyPZ/06VSEaVrrec7K4uiTG234cXtibdS+hciIkxa 2f4aTadttpdEsknLV98H0aXg7+fZ/nfQZlbyaJ1/fQ4PpEH503CSjaXaTZvx1i9TgapF oyGVWR8s4dVm1NAVc00f9dAnRHCLp9ABqrEp/Son9m9ovYGIxjdUX7NKVMYuyfLARiox m0+rOsQdaQB48X6mkJ5ipaWwrq4N55LDhVWE0bVXyIH4x12GgCDSo2IbkqsiDW+SoMHE xaIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Z3y7Q77txeAP7iJLYC7n3mSJHiMMbaYNg2nFmrpoCfQ=; b=l7lGdy3Q+veUMCrlY6nCWZFfTwuPaqvkLjnk7w/BM+A+NU+hLBDj18o5xNwHjWEPHt FDhzuMjwEfXn5a97T/74s0HOfUHHnlGohodrxk/w4jlqnqg8csNNk3TN/Z6fYvfkwnbd zApDj/FIaIaM809oGyiuJgi6Svls8htHTvr/AqA1lSsTaAOG+Q6Zx4MSKF+APlxl9qjS oIgLk77kcbGjcQUOEPkPukidEG230KAZCAVpT3T3J28U1IMneDSliKqPCbOuJl5Gw3lo dzNNosq2y1tnGsO1dzxEguDTdab5qGcBSLjsCUH2LU/sJQ0n9WJhUjjg0vhTJyE1u9Nd 85pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=b9XWQ1Xm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1si11150641plb.188.2017.06.20.02.38.11; Tue, 20 Jun 2017 02:38:11 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=b9XWQ1Xm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752917AbdFTJiF (ORCPT + 25 others); Tue, 20 Jun 2017 05:38:05 -0400 Received: from mail-wr0-f177.google.com ([209.85.128.177]:35936 "EHLO mail-wr0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752899AbdFTJiC (ORCPT ); Tue, 20 Jun 2017 05:38:02 -0400 Received: by mail-wr0-f177.google.com with SMTP id c11so32953141wrc.3 for ; Tue, 20 Jun 2017 02:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z3y7Q77txeAP7iJLYC7n3mSJHiMMbaYNg2nFmrpoCfQ=; b=b9XWQ1XmVf6Aufe28NxugkRIjauFvuUTseQbsBNks7/rGQWYjKLTCdRzR7f//MznaW EDvn3nWPhaO8n1XDBI/eeKJP0apQj4UH0CpVQ1yYHKGB7okI7XQRSpymBGDaeLlN6OyY qGDMhtLJxbujokKr+7WbZLDTez8iljGsCeJIk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z3y7Q77txeAP7iJLYC7n3mSJHiMMbaYNg2nFmrpoCfQ=; b=go2oiyX5BlXsAoeOTto7eHF7NYMuX68CMuRk4BS4ktKlmKpfgd/P1lEnE9jXF5pRRI FU74ruwlALpqgz/PfR6ZUA005J43prbaj05AJ4nDabUAdNFtS3IbwC8ZYAz6P4hRi0x1 wPQjk1/4SlAKof9Urwwaa9MGs58GsL4idBStCIb1QC1JFtGict1By6oPEh2Sn3t0HHsV QNnqfEAtTittqVsslQOCu8l3pyxpzMAM623mLGPzjEgg8afI7mgx9XghKA3JhGl/D/H8 vC3mYzTc3Uxlqs7TNefAdkt7BQfyXrGRNlCpJmJUmioHu6FPiEQjyFbhgB3RmJBFmYQ0 jbpA== X-Gm-Message-State: AKS2vOyP8KUUAXmG3FHxeZI8onb4tvPu822nUUTXMm7ri9l1JPdUCbjW ixURthRXFGqU3g73 X-Received: by 10.223.161.219 with SMTP id v27mr3194885wrv.135.1497951476411; Tue, 20 Jun 2017 02:37:56 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.93.217]) by smtp.gmail.com with ESMTPSA id e24sm4482318wrc.35.2017.06.20.02.37.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:37:56 -0700 (PDT) From: Benjamin Gaignard To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 25/51] rtc: ep93xx: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:33 +0200 Message-Id: <1497951359-13334-26-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1497951359-13334-1-git-send-email-benjamin.gaignard@linaro.org> References: <1497951359-13334-1-git-send-email-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rtc_time_to_tm() and rtc_tm_to_time() are deprecated because they rely on 32bits variables and that will make rtc break in y2038/2016. Stop using those two functions to safer 64bits ones. For the same reasons use set_mmss64 callback instead of set_mmss Signed-off-by: Benjamin Gaignard CC: Alessandro Zummo CC: Alexandre Belloni CC: rtc-linux@googlegroups.com CC: linux-kernel@vger.kernel.org --- drivers/rtc/rtc-ep93xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 1.9.1 diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index 6940382..dcb71b2 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c @@ -59,15 +59,15 @@ static int ep93xx_rtc_get_swcomp(struct device *dev, unsigned short *preload, static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm) { struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev); - unsigned long time; + unsigned long long time; - time = readl(ep93xx_rtc->mmio_base + EP93XX_RTC_DATA); + time = readl(ep93xx_rtc->mmio_base + EP93XX_RTC_DATA); - rtc_time_to_tm(time, tm); + rtc_time64_to_tm(time, tm); return 0; } -static int ep93xx_rtc_set_mmss(struct device *dev, unsigned long secs) +static int ep93xx_rtc_set_mmss64(struct device *dev, time64_t secs) { struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev); @@ -89,7 +89,7 @@ static int ep93xx_rtc_proc(struct device *dev, struct seq_file *seq) static const struct rtc_class_ops ep93xx_rtc_ops = { .read_time = ep93xx_rtc_read_time, - .set_mmss = ep93xx_rtc_set_mmss, + .set_mmss64 = ep93xx_rtc_set_mmss64, .proc = ep93xx_rtc_proc, };