Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1890454pxb; Sun, 10 Jan 2021 15:21:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFqaEWQCe8AFO+k5xohMBSdh62CYwbmqf5P2oufdkWYjYG8CFWQtZvp5WtrnRPCqwS4PBJ X-Received: by 2002:a17:907:429d:: with SMTP id ny21mr9042848ejb.290.1610320879084; Sun, 10 Jan 2021 15:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610320879; cv=none; d=google.com; s=arc-20160816; b=lT/73G7xXJNHV2+ljnvzKVhPYwaQoMgRcimWRF1+Liz8GGv59vmgX7Ch3l8ZlZdIuW mla1/aqa689/xMFkUrvrQyXVYIPgpDZ/l+PQrvamwylV5lLM1szcOAzFonBtMWyEl9nO 4D8EbPGIG4eDQh1ooFLVa2XpPbOMoo9sgGS2rEA2FdX0yKo6zFXdURfEylrI+rX3Ozvh 6DZNGD68lrTRrR517rl3NkK3Q8xc5f7XcxD8yni1A0/TOuxXLyQ52tkam3zQuf1MhWaA zo+4oHINXxCVY31h00d94XxNGWQhi6U93M9G/+VAUHoba9V6HA6bqEm+5peEmySN6/cW EC/Q== 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=25dqLGN2yqlBnKbjel95YRvOIJk037PFNbwevWx5PlI=; b=j99MGBwIy9V1gQM8SetF3VUMfOkYgx/H2fb4zQZwQJ5UzqOZ0LwiLK/sy4mmHTeNkr fyZe7RaWitz+xnTl6F8kuz4Xv1sNP8yMkbccQPk1smWLH1iDKyJFvz+kcDRgpsljyvEP /gc1Y2OeNgFVaORZvvcVWbD+ARG3+HppTZgfzwLD2y2ETE+cmAgZP1j5CWtk8KqvGxrh R7Tbr3aBm2i2cD/1TBRAwG4WLVaAlGKSrkuTdiOlPz+O2fO/tHOeeufcJTidW6GG0zhy abVEkestAF2oKP8zBAWLa1qiqSqXxzpW1xytqema0x89IkkGoUAGV8gc4iTioxtCom3l wXZw== 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 x9si5951442ejc.552.2021.01.10.15.20.55; Sun, 10 Jan 2021 15:21:19 -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 S1727041AbhAJXSu (ORCPT + 99 others); Sun, 10 Jan 2021 18:18:50 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:64899 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726908AbhAJXSs (ORCPT ); Sun, 10 Jan 2021 18:18:48 -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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 3FDA640005; Sun, 10 Jan 2021 23:18:05 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org, Linus Walleij , Alessandro Zummo , Alexandre Belloni Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 02/17] rtc: pl031: use RTC_FEATURE_ALARM Date: Mon, 11 Jan 2021 00:17:37 +0100 Message-Id: <20210110231752.1418816-3-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 instead of setting set_alarm, read_alarm and alarm_irq_enable to NULL. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-pl031.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index 224bbf096262..7c3967df4f9a 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c @@ -352,12 +352,8 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id) } } - if (!adev->irq[0]) { - /* When there's no interrupt, no point in exposing the alarm */ - ops->read_alarm = NULL; - ops->set_alarm = NULL; - ops->alarm_irq_enable = NULL; - } + if (!adev->irq[0]) + clear_bit(RTC_FEATURE_ALARM, ldata->rtc->features); device_init_wakeup(&adev->dev, true); ldata->rtc = devm_rtc_allocate_device(&adev->dev); -- 2.29.2