Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1952727yba; Sun, 7 Apr 2019 04:55:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqzMF7X7JGiSnsNCS9+03IcTab/AIDqx7K9avOB/LVmc1Gs1TrbULEliFk3dyBtu7rrmFB X-Received: by 2002:a65:50c2:: with SMTP id s2mr21577954pgp.112.1554638157634; Sun, 07 Apr 2019 04:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554638157; cv=none; d=google.com; s=arc-20160816; b=zrG4ZGMYaCa2K0/e94LFh7gsnR3TsRYPx7G8NwWQwaDRlLGhaIsWqMJhoZMIW9WN3a W7vliIgoGrxGSKNz6YcrZXr/KOdOgbqt5Pm+s15soB18rorvNOlLbd98kHn6JI8PnuZA rS5mHnWpqANI8A1pcUd3YQeoNABP532mBqHweuMrNYTIugEyFKNPHi82RAepohrMVjnZ G8BTEtVrOtsIEq2poU8jhB/SPQt6zGOFfiNgIu2tic4euCmbYsH/q/5GwC8XKAx7tASM wFOTwGVIKYa5cGvjEdUw9Lz9Vk5SEwC/A22b5CQvcUD8UMKviNyrZjmRHbH5KJHJlojG SYRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yjKcNIP5aeyhgxSyU7MNZYO+h+E/EP0kRQjRXU0FVfY=; b=LGKm/eLVumJ7qMhhe+1A9NZYKIPOEtD3oIxsmSq1DfMClRWu3KJjx98MuYteEEA6jJ TEaRgJ/dk6AOjIRtE8RqRfMbR8tiVJz354RDkdjEVcJ8M90J37F0oSklXf0r7JUZYlsv Yg+EVVYpvXwP+dvghZsu2G3QHiYSNqI2ZtwdPiOQ2UVV3I5wpm9wTtL3eZnKY0+Jv+xV 3h8qSW9IOykFG8YxT+YToPfylZD0jr3ibwvVSSBMMoskjeFoGygun9aq8Vcgg7SgY3q8 W4yslj5jueLaWnneovyN/3HDfhqB8J5nod93D0in7WB2B7tPQJpzee0sgJ6Jz0sSHyJK J0kw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si18020936pgo.433.2019.04.07.04.55.40; Sun, 07 Apr 2019 04:55:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726497AbfDGLys (ORCPT + 99 others); Sun, 7 Apr 2019 07:54:48 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:50153 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726263AbfDGLys (ORCPT ); Sun, 7 Apr 2019 07:54:48 -0400 X-Originating-IP: 86.202.231.219 Received: from localhost (lfbn-lyo-1-149-219.w86-202.abo.wanadoo.fr [86.202.231.219]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 1F65F1C0009; Sun, 7 Apr 2019 11:54:45 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Alexandre Belloni Subject: [PATCH] rtc: wm831x: use .set_time Date: Sun, 7 Apr 2019 13:54:44 +0200 Message-Id: <20190407115444.20650-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use .set_time instead of the deprecated .set_mmss. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-wm831x.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index 6a0defd16088..ed29f4df2a3c 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c @@ -165,15 +165,17 @@ static int wm831x_rtc_readtime(struct device *dev, struct rtc_time *tm) /* * Set current time and date in RTC */ -static int wm831x_rtc_set_mmss(struct device *dev, unsigned long time) +static int wm831x_rtc_settime(struct device *dev, struct rtc_time *tm) { struct wm831x_rtc *wm831x_rtc = dev_get_drvdata(dev); struct wm831x *wm831x = wm831x_rtc->wm831x; struct rtc_time new_tm; - unsigned long new_time; + unsigned long time, new_time; int ret; int count = 0; + time = rtc_tm_to_time64(tm); + ret = wm831x_reg_write(wm831x, WM831X_RTC_TIME_1, (time >> 16) & 0xffff); if (ret < 0) { @@ -334,7 +336,7 @@ static irqreturn_t wm831x_alm_irq(int irq, void *data) static const struct rtc_class_ops wm831x_rtc_ops = { .read_time = wm831x_rtc_readtime, - .set_mmss = wm831x_rtc_set_mmss, + .set_time = wm831x_rtc_settime, .read_alarm = wm831x_rtc_readalarm, .set_alarm = wm831x_rtc_setalarm, .alarm_irq_enable = wm831x_rtc_alarm_irq_enable, -- 2.20.1