Message ID | 1497951359-13334-21-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 y2csp1274864qgd; Tue, 20 Jun 2017 02:38:11 -0700 (PDT) X-Received: by 10.84.217.152 with SMTP id p24mr10520135pli.276.1497951491013; 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=XKrW0DlOXxxcjk8mYDmLhssGkvkPVNWwkI2Hm05H4ukC+Pdz6FfzPHg8iKgVzjlhB6 RUl2WP6Trf0ej+e5TJlevPzNf8JN4O7jZeUbPxlVSMXazzepsb+HJxW8Q/Y6TwgtQwDF t4uSyWdEc/qXJxVeXaf8AHEibcemw5+7LVi9K7BsMiTCinhVXudbo3HfIreZAxcgmG6F 0dIHrGyoTuAiyEI7Y1Nuieos2YDmHxRo5UUhlW+p6tFTt2LCT4eoz9NCVW3b4TrluTFN 8cauGymrsqRso+LHwmYMAI/z+kRsruTJFvOpuC5Yxm74OF/p+zSYQMGMdf+5JN6/t/JM rxPg== 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=jSHJ6hfSDoq2Nbw3rFdquaj8RSk52cJU29rwPHw5CEM=; b=HCCmmEXlYXQMUAu8rHJUjn5bX+0EL8v975No8uxGKisNNLwJ3oLCIoJUeXDQGVR+J9 1mNnYfBfbHon+sXuu0HTihzs/XwWIj9HBEKkDsCf4oaY49YQL4QEA72KCLaYfLqTUqoW Ey41gL78KOZemLFagFEb5UfyV+aYpuMjetiBV6Olh+/klFsVZ6OY9o6zn9DsNwtDFgor iTz8g4MwHWmPPfxAXkjpU9siTZs/DOJzrBvsI+LVEWadtfVVs1SvtHkqRe/Dsd+9juru G4zshlyASxw7w2JkCNv/D4NI29ME17FikV0D8beDvNrJm58rorM9QLvXLM/uusW017t7 zdQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=YAicrbXS; 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 v1si11150641plb.188.2017.06.20.02.38.10; Tue, 20 Jun 2017 02:38:10 -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=YAicrbXS; 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 S1752835AbdFTJhw (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Tue, 20 Jun 2017 05:37:52 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:38662 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbdFTJht (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 20 Jun 2017 05:37:49 -0400 Received: by mail-wm0-f44.google.com with SMTP id u195so14568911wmd.1 for <linux-kernel@vger.kernel.org>; Tue, 20 Jun 2017 02:37:49 -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=jSHJ6hfSDoq2Nbw3rFdquaj8RSk52cJU29rwPHw5CEM=; b=YAicrbXSJGPFBWPCHaxmRsl6MVM86zdzY5XaWZG7Di2ecUFqd/H1jZEPDteP6vKBhw gKZtm0pS76ySeM2Ikx8xAUZOqJQ7Zc61MqOeXj8oWyA/PJV8Tl31OHSD9hoEWi2oD/v5 aCjCuy+lafZTM712kGuLZ7/JpJs/6N5HHvznA= 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=jSHJ6hfSDoq2Nbw3rFdquaj8RSk52cJU29rwPHw5CEM=; b=EyHj/U/ouu+2k7isjj9m3mmtTMcLGL5/2/LyKeKSn7y5bEOO+C/V0N9u7eyCZVZ653 W68xDnB4baCfUjjEZPLUrmBs5VMkpLdvb2iHZKQZLG78ZFLulSH4CEotopXqwnZYhC52 coAsqO8WQKZWKJc0Z8T/kq8qNEXfphvqiPDRU35bv6jjtrjUHVwN8AXMuqRzv6Qix39F h2QNF/Drjyy26mDHJnKE2QhAIiDzZZatwnzT//8AWdZPv8EkeLoNzkM8A7eNGaa5LBdg 8y7a5tFYe6iiB1mwkUHPc3BW27pZuoUHaMD5i9iFzpkIR/FJtJkYipQYBPv/x89CwBJW 413w== X-Gm-Message-State: AKS2vOxy2Z6RwX7yGQwWeMYs11r1DwKrikvvNQAbjypzXglqJwzq8PhC c3GSpI5Jr6jalV/F X-Received: by 10.28.59.212 with SMTP id i203mr1897295wma.18.1497951468472; Tue, 20 Jun 2017 02:37:48 -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.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:37:48 -0700 (PDT) From: Benjamin Gaignard <benjamin.gaignard@linaro.org> To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 20/51] rtc: ds1374: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:28 +0200 Message-Id: <1497951359-13334-21-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-ds1374.c b/drivers/rtc/rtc-ds1374.c index 38a2e9e..624b915 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c @@ -164,7 +164,7 @@ static int ds1374_read_time(struct device *dev, struct rtc_time *time) ret = ds1374_read_rtc(client, &itime, DS1374_REG_TOD0, 4); if (!ret) - rtc_time_to_tm(itime, time); + rtc_time64_to_tm((u64)itime, time); return ret; } @@ -172,9 +172,9 @@ static int ds1374_read_time(struct device *dev, struct rtc_time *time) static int ds1374_set_time(struct device *dev, struct rtc_time *time) { struct i2c_client *client = to_i2c_client(dev); - unsigned long itime; + unsigned long long itime; - rtc_tm_to_time(time, &itime); + itime = rtc_tm_to_time64(time); return ds1374_write_rtc(client, itime, DS1374_REG_TOD0, 4); }
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: 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-ds1374.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1