public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Esben Haabendal <esben@geanix.com>
Cc: <linux-rtc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>, Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH 2/2] Revert "rtc: cpcap: Fix initial enable_irq/disable_irq balance"
Date: Fri, 31 Oct 2025 10:37:41 +0000	[thread overview]
Message-ID: <20251031103741.945460-2-jonathanh@nvidia.com> (raw)
In-Reply-To: <20251031103741.945460-1-jonathanh@nvidia.com>

Commit e0762fd26ad6 ("rtc: cpcap: Fix initial enable_irq/disable_irq
balance") set 'alarm_enabled' prior to calling the function
devm_request_threaded_irq() because this enables the IRQ. However, right
after calling devm_request_threaded_irq(), the driver calls
disable_irq() to disable the IRQ and so now 'alarm_enabled' will be true
but the IRQ is actually disabled. Revert this commit to fix the
'alarm_enabled' state.

Fixes: e0762fd26ad6 ("rtc: cpcap: Fix initial enable_irq/disable_irq balance")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
I don't have a board with this device, but from reviewing the code this
does look correct.

 drivers/rtc/rtc-cpcap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/rtc/rtc-cpcap.c b/drivers/rtc/rtc-cpcap.c
index 8b6b35716f53..c170345ac076 100644
--- a/drivers/rtc/rtc-cpcap.c
+++ b/drivers/rtc/rtc-cpcap.c
@@ -268,7 +268,6 @@ static int cpcap_rtc_probe(struct platform_device *pdev)
 		return err;
 
 	rtc->alarm_irq = platform_get_irq(pdev, 0);
-	rtc->alarm_enabled = true;
 	err = devm_request_threaded_irq(dev, rtc->alarm_irq, NULL,
 					cpcap_rtc_alarm_irq,
 					IRQF_TRIGGER_NONE | IRQF_ONESHOT,
-- 
2.43.0


  reply	other threads:[~2025-10-31 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31 10:37 [PATCH 1/2] Revert "rtc: tps6586x: Fix initial enable_irq/disable_irq balance" Jon Hunter
2025-10-31 10:37 ` Jon Hunter [this message]
2025-10-31 13:20 ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251031103741.945460-2-jonathanh@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=esben@geanix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox