Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1890521pxb; Sun, 10 Jan 2021 15:21:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDsm5tNMbpKD+3rjxHkVq3gwIhreYOyijKlJZYYaszbegflVXbXLWcxymcDZq4eW8myZZf X-Received: by 2002:a50:955b:: with SMTP id v27mr12202463eda.324.1610320888822; Sun, 10 Jan 2021 15:21:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610320888; cv=none; d=google.com; s=arc-20160816; b=NLUeukpv1rK5WNhVh7R47ebKZmV6MiqzcdnROUGqCc8+OAW83ACSECx8zfi6z3hPay alqdVYn9TjTRf+ePc+TSwKumgaKJCm5KDyoKTqHEdL3elV0JSKu1TqiZ8Avi3TYFqImG NjIXPxIEUu15OXV380tcZFvB46CYoOBkfkGEVdMf1+wzGPgkcZ6bRTksXx0KxV6UbQS9 v/46jZTNsAm/A6m9NoK615ZGT/ZuMw9M2a/lt1Ip0IcmkNTAkBvK0yCeSQwGYh0VcZQ+ XFLvS7BMrSoZ36nV90nfINM0lWyeiI7Xl6OUMR7SATTzqBhurIiNH/5DG63aZfvBn00k wm8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zoSpDbCT7ze9bGhTDC1LqaO9X7Ifzj0j+8fZYbY5oj0=; b=Bsp/YatIiz05bRTNyk4ReSFn9dzPCm6Cr5CRj3QOpiMRkGTB6gvSrKJvMVfMbXeWZ0 GLsmr6B6J3r4TOegT/bS2DxHcNSZti2YDjbaq2zs1fh9zNGdDhJQLe6rwmJNXInP95v6 Hi/ZTS28dIsVXeXVj+ydqvlgEbS3jkar9hPIJHCQNvF/KA+x67amE2pTc0aislJp2YWK BLsxPzI7Z4TYh99wL3SOBwDaofbl0E3r5o3+Qv84Vv8iESNiWfzXqlSsKBO6VZGxu0/N J+umDljKFzrW+wp6Y04+FTDrf+gPsqJ4e5aUqhNeRr5GLg/CtAiWrHJPhhYzuWD/DF7Q gwlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si3944406edx.35.2021.01.10.15.21.05; Sun, 10 Jan 2021 15:21:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727385AbhAJXTN (ORCPT + 99 others); Sun, 10 Jan 2021 18:19:13 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:35515 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727316AbhAJXTM (ORCPT ); Sun, 10 Jan 2021 18:19:12 -0500 X-Originating-IP: 86.202.109.140 Received: from localhost (lfbn-lyo-1-13-140.w86-202.abo.wanadoo.fr [86.202.109.140]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D6C071BF209; Sun, 10 Jan 2021 23:18:29 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org, Alessandro Zummo , Alexandre Belloni Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 17/17] rtc: tps65910: remove tps65910_rtc_ops_noirq Date: Mon, 11 Jan 2021 00:17:52 +0100 Message-Id: <20210110231752.1418816-18-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210110231752.1418816-1-alexandre.belloni@bootlin.com> References: <20210110231752.1418816-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clear RTC_FEATURE_ALARM to signal that alarms are not available instead of having a supplementary struct rtc_class_ops without alarm callbacks. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tps65910.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 2d87b62826a8..e1415a49f4ee 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -361,13 +361,6 @@ static const struct rtc_class_ops tps65910_rtc_ops = { .set_offset = tps65910_set_offset, }; -static const struct rtc_class_ops tps65910_rtc_ops_noirq = { - .read_time = tps65910_rtc_read_time, - .set_time = tps65910_rtc_set_time, - .read_offset = tps65910_read_offset, - .set_offset = tps65910_set_offset, -}; - static int tps65910_rtc_probe(struct platform_device *pdev) { struct tps65910 *tps65910 = NULL; @@ -425,12 +418,12 @@ static int tps65910_rtc_probe(struct platform_device *pdev) irq = -1; tps_rtc->irq = irq; - if (irq != -1) { + if (irq != -1) device_set_wakeup_capable(&pdev->dev, 1); - tps_rtc->rtc->ops = &tps65910_rtc_ops; - } else - tps_rtc->rtc->ops = &tps65910_rtc_ops_noirq; + else + clear_bit(RTC_FEATURE_ALARM, tps_rtc->rtc->features); + tps_rtc->rtc->ops = &tps65910_rtc_ops; tps_rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; tps_rtc->rtc->range_max = RTC_TIMESTAMP_END_2099; -- 2.29.2