Message ID | 1497951359-13334-16-git-send-email-benjamin.gaignard@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1280107qgd; Tue, 20 Jun 2017 02:54:44 -0700 (PDT) X-Received: by 10.98.35.148 with SMTP id q20mr29262820pfj.237.1497952483943; Tue, 20 Jun 2017 02:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497952483; cv=none; d=google.com; s=arc-20160816; b=k1t5ehgOJj4W88nSc3d38bV6ubxA0EayCxAL0aNrbIwklwZMPSKNQknZ39A+7Ew2hs w6DOTn1zjGpPj4duLRXgZ3ZrjqU7woJvXRd77O0ZUP0HUjCBYLBdvHp53rbUkyFT4sys omWplGbBEMrZREKLqA9zsOZWUDVy/XqJIV+gGUPcvtUXHjOMk7dMQL1Di3Do24Zn6njv 1r9Ef/cluxfLWT7litjPLhODYc6g3rRjZ4GvCOI1+bGzt6MUVUTOFqL7NvGpvOFgewRI YS9qOdQTDlpAtvrQweTV1uRBmluQ1m7MUXw05ApNNOIqke3sfqmHIWV2xj2cD+Dc1C1K mOeA== 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=otaYV6j662M10NzQ4yiv2CYjv9VXe3Cvlnnyzozd3nE=; b=IJJZde02Y7I3AYXl9L23V0LCO66drx/ufyQ+bLipVggIPROb4C/hPaAU6m2/Cs21Dw qKDkF1Z3tQM7RLV6k1RPlIhupkr2dDxhNZEymABYWck6frz9sfQKYg4UL7ctM8nR3TGQ ypaw0DU7aWvMzO4X6pJXRHcLqF5F82uNs72bgmSuvXGIuws3UBGbVOAW4nkYq6NPG5XT zV0ciYfAICs/6E0vE+tqvrVudOXPE9chytRcPuZdySkvGkw4T9IB9CH6ZrWohdBE/RWp VL38bwb8pSjNTuRA9+ZWpuPDLko4FvH2Ap3kqCgGmWKTJauFuEmhS3zUm1qPeFCmGQvu SSdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=ZAGWKTTy; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u14si8325720pgb.287.2017.06.20.02.54.43; Tue, 20 Jun 2017 02:54:43 -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=ZAGWKTTy; 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 S1752770AbdFTJhe (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Tue, 20 Jun 2017 05:37:34 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:35472 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611AbdFTJhb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 20 Jun 2017 05:37:31 -0400 Received: by mail-wr0-f172.google.com with SMTP id y25so49122510wrd.2 for <linux-kernel@vger.kernel.org>; Tue, 20 Jun 2017 02:37:30 -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=otaYV6j662M10NzQ4yiv2CYjv9VXe3Cvlnnyzozd3nE=; b=ZAGWKTTyEbDg28tnmbzmVuetPaabyRLJ2+avtU/jLPkJu1WYvXaNKMUblOhgXli8Fx 1wEbIZucjpbUa4Gye4M6ioquaqW/CPIv934ve2HUKlDDLSle/WDI/THXz3xQEhaosvpp qSCakviBBqHtls6nyxgFc6OEE4M/MQC/zceDQ= 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=otaYV6j662M10NzQ4yiv2CYjv9VXe3Cvlnnyzozd3nE=; b=OhGL5DMI5x3c9XysH/EIaBGvHpVb8cIZ3Xc+3M3OIPth4pV7gWUf1RdhICf/qxkD2/ s3/fC+GZi8Xi80vi7a5f5TRdBqivl3F4bjDvhQuuV10Zpi55/LxiQrWIsen3qQu4OEpu NlzDj8VjFGJg7tPbSQEzEQMBLft8aIJ6DSjSL2mKBtXxWCsSIIWF6C5nTPWv7aTIeIDz H8HCQm8Gp+GiZa393apU4FUxW68kefydyhe6fVXvG7CF4oWi9KjlbqfLdmNYg8QeTMYk aZCznGcv1YA/2SqlzOugTl/03GR64s/ECoqf7Fr2OP3pJwGPO97RPLLM8u1T9SG0Jf8l GZfA== X-Gm-Message-State: AKS2vOx5slls4hZwySvQtv5Ynw4U9/XjrdhImh6QxH0/2Y9B7kI9Fnjs OO+eC93LBSsCs5fH X-Received: by 10.223.166.8 with SMTP id k8mr20003872wrc.172.1497951445077; Tue, 20 Jun 2017 02:37:25 -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.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:37:24 -0700 (PDT) From: Benjamin Gaignard <benjamin.gaignard@linaro.org> To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, Support Opensource <support.opensource@diasemi.com>, Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 15/51] rtc: da9063: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:23 +0200 Message-Id: <1497951359-13334-16-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
rtc: stop using rtc deprecated functions
|
expand
|
diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c index f85cae2..c0e140d 100644 --- a/drivers/rtc/rtc-da9063.c +++ b/drivers/rtc/rtc-da9063.c @@ -227,8 +227,8 @@ static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm) { struct da9063_compatible_rtc *rtc = dev_get_drvdata(dev); const struct da9063_compatible_rtc_regmap *config = rtc->config; - unsigned long tm_secs; - unsigned long al_secs; + unsigned long long tm_secs; + unsigned long long al_secs; u8 data[RTC_DATA_LEN]; int ret; @@ -247,8 +247,8 @@ static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm) da9063_data_to_tm(data, tm, rtc); - rtc_tm_to_time(tm, &tm_secs); - rtc_tm_to_time(&rtc->alarm_time, &al_secs); + tm_secs = rtc_tm_to_time64(tm); + al_secs = rtc_tm_to_time64(&rtc->alarm_time); /* handle the rtc synchronisation delay */ if (rtc->rtc_sync == true && al_secs - tm_secs == 1)
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. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> CC: Support Opensource <support.opensource@diasemi.com> CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@free-electrons.com> CC: rtc-linux@googlegroups.com CC: linux-kernel@vger.kernel.org --- drivers/rtc/rtc-da9063.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 1.9.1