Message ID | 1497951359-13334-37-git-send-email-benjamin.gaignard@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1277488qgd; Tue, 20 Jun 2017 02:46:24 -0700 (PDT) X-Received: by 10.98.76.83 with SMTP id z80mr20912356pfa.87.1497951984137; Tue, 20 Jun 2017 02:46:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497951984; cv=none; d=google.com; s=arc-20160816; b=gJzDyOHsxcZ/Tm6WhMLz2koO9x/wq+SbvjPZImQq1c2ClHpCL4vPBmIXTqF5V1fCTx jP5dwcyyqyml3/QCDPPQUaMxKiZ5Xof+Q4E06mbF6Z1hAkb7RZfV3xPJr+md7Lpksq87 QbQc4jRb4fcd2+X46tpnSjMTe3Hulwkw09APzo8NeCK5lWJMHbwyb94y9GAtcSybbEW2 zwylDFSUZ3tCPAkl8NcdQAoB6lh/ka4iHFxIqtik4I1q1Pbwv3GYTbDT5su+cL1Mq2/o w58yMYX/S39NZqXL5rPGGsvaTsBr2L1wD+aquoTUUP1ZBPWAed4dsqO/YBkGAlfKmyjX ESZg== 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=PkpBNtHW9s2hAcMDA2kDZOafTxLz6igq0gdWD3j/TSQ=; b=zh57TQICV+hOQcno9DfS6Rw2E3tbEH0me5jKgOhZOZyYiqobr+zHyUWEO9GDUd+RoF eclGFer9CgGvx1HLtlBA8qKp8BPvGeHa9wB8tnVWU5mVAbMYuSkGVUSfdH/vujUlSGll ZB+uYuhGpGoSYNalqkwtCc9sgH+GQ6b0TqLiIGYJ2SuZ1jIuzMp8bDNnTbcXxVXPKb8e +cXQAS6rthH+JfxCQ1jdbX6iv8eny1lme1UasPFTB9n0ebOMBFotj1B+kMWe8lpytXBJ IW4cIpH+fvxTKNltji5ORaI7GkC8H1p9pAhZBBCERplexNZHY1QZ7pwLqzkSufZts1jx OT9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=KO4UlOc8; 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 w20si10072129pgj.290.2017.06.20.02.46.23; Tue, 20 Jun 2017 02:46:24 -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=KO4UlOc8; 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 S1753092AbdFTJqU (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Tue, 20 Jun 2017 05:46:20 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:36069 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752991AbdFTJiT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 20 Jun 2017 05:38:19 -0400 Received: by mail-wr0-f174.google.com with SMTP id c11so32958572wrc.3 for <linux-kernel@vger.kernel.org>; Tue, 20 Jun 2017 02:38:18 -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=PkpBNtHW9s2hAcMDA2kDZOafTxLz6igq0gdWD3j/TSQ=; b=KO4UlOc8OkvFmryIFz/M7Ig4Mof5KfM7AgyJhHwgXdR8qTwQK3ZzPFtnAGBs4qdEnw 0F0wcy82agNkp62oXX7rvtWch/xbviu3rG2lIuZFVi+FhJ4ZEDRLXCPCQgSaekyElOCj fIJz1Vq4DaeEJEEo5BRKcmOM9d8ZZMapuDoxE= 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=PkpBNtHW9s2hAcMDA2kDZOafTxLz6igq0gdWD3j/TSQ=; b=X7fCMQnR3XHq8CGfJi+HN8ZwE99XeEDEHp28Ayczv/lr/L0fohMCA3TmOvr8A1QadC z7n8ooAG4nVDA5Tkqfv730SqyF3ilUyNprAaqFQEPIVIKnbCkaQ8mQ2CX462GILIgMGc xT2m0HYSP+b8LsDFbmh3PYnckS4rD194xtEe/fU1pxnI2mErEAspnGOvw1yPCCXzHwnM e816Ll6OLcupXjYdWa+3KefZc1zyv2525pqkeUAiWkb7MsV7Vxk3ff7YCL6PAmADXg3v jJyYT0EcgmFxT8qwHCt2684R2gFpiXG11S8byF5ODeACqBKCx4HUE9G64hj70qQSLNPa 9CnQ== X-Gm-Message-State: AKS2vOyjF0+/C7+UeZesIYkcMHth7gQR7i7V6wdwfn7HyCb7tsVJ7qO3 cS6zMl4EtY7N8Jrj X-Received: by 10.223.133.167 with SMTP id 36mr20084496wrt.86.1497951497995; Tue, 20 Jun 2017 02:38:17 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.93.217]) by smtp.gmail.com with ESMTPSA id e24sm4482318wrc.35.2017.06.20.02.38.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:38:17 -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 36/51] rtc: rs5c348: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:44 +0200 Message-Id: <1497951359-13334-37-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-rs5c348.c b/drivers/rtc/rtc-rs5c348.c index 9a30698..f82c0bc 100644 --- a/drivers/rtc/rtc-rs5c348.c +++ b/drivers/rtc/rtc-rs5c348.c @@ -137,7 +137,7 @@ struct rs5c348_plat_data { if (rtc_valid_tm(tm) < 0) { dev_err(&spi->dev, "retrieved date/time is not valid.\n"); - rtc_time_to_tm(0, tm); + rtc_time64_to_tm(0, tm); } return 0; @@ -183,7 +183,7 @@ static int rs5c348_probe(struct spi_device *spi) dev_warn(&spi->dev, "voltage-low detected.\n"); if (ret & RS5C348_BIT_XSTP) dev_warn(&spi->dev, "oscillator-stop detected.\n"); - rtc_time_to_tm(0, &tm); /* 1970/1/1 */ + rtc_time64_to_tm(0, &tm); /* 1970/1/1 */ ret = rs5c348_rtc_set_time(&spi->dev, &tm); if (ret < 0) goto kfree_exit;
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-rs5c348.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1