linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@st.com>
Cc: linux-rtc@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 14/14] rtc: stm32: use rtc_lock/rtc_unlock
Date: Tue, 19 Jan 2021 23:06:52 +0100	[thread overview]
Message-ID: <20210119220653.677750-14-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20210119220653.677750-1-alexandre.belloni@bootlin.com>

Avoid accessing directly rtc->ops_lock and use the RTC core helpers.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-stm32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c
index d774aa18f57a..75a8924ba12b 100644
--- a/drivers/rtc/rtc-stm32.c
+++ b/drivers/rtc/rtc-stm32.c
@@ -209,7 +209,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id)
 	const struct stm32_rtc_events *evts = &rtc->data->events;
 	unsigned int status, cr;
 
-	mutex_lock(&rtc->rtc_dev->ops_lock);
+	rtc_lock(rtc->rtc_dev);
 
 	status = readl_relaxed(rtc->base + regs->sr);
 	cr = readl_relaxed(rtc->base + regs->cr);
@@ -226,7 +226,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id)
 		stm32_rtc_clear_event_flags(rtc, evts->alra);
 	}
 
-	mutex_unlock(&rtc->rtc_dev->ops_lock);
+	rtc_unlock(rtc->rtc_dev);
 
 	return IRQ_HANDLED;
 }
-- 
2.29.2


  parent reply	other threads:[~2021-01-19 22:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 22:06 [PATCH 01/14] rtc: ac100: use rtc_lock/rtc_unlock Alexandre Belloni
2021-01-19 22:06 ` [PATCH 02/14] rtc: asm9260: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 03/14] rtc: ds1305: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 04/14] rtc: ds1307: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 05/14] rtc: ds1685: " Alexandre Belloni
2021-01-25  3:33   ` Joshua Kinard
2021-01-19 22:06 ` [PATCH 06/14] rtc: ds3232: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 07/14] rtc: hym8563: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 08/14] rtc: m41t80: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 09/14] rtc: mcp795: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 10/14] rtc: pcf2123: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 11/14] rtc: rv3029: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 12/14] rtc: rx8010: " Alexandre Belloni
2021-01-19 22:06 ` [PATCH 13/14] rtc: rx8025: " Alexandre Belloni
2021-01-19 22:06 ` Alexandre Belloni [this message]
2021-01-20 17:50 ` [PATCH 01/14] rtc: ac100: " kernel test robot
2021-01-25 22:14 ` [PATCH v2] " 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=20210119220653.677750-14-alexandre.belloni@bootlin.com \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.torgue@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).