All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Keerthy <j-keerthy@ti.com>, Johan Hovold <johan@kernel.org>
Subject: [PATCH 4/4] rtc: omap: drop unnecessary register unlock around reads
Date: Wed,  4 Jul 2018 11:05:58 +0200	[thread overview]
Message-ID: <20180704090558.16647-5-johan@kernel.org> (raw)
In-Reply-To: <20180704090558.16647-1-johan@kernel.org>

Drop unnecessary register write-unlock around two read accesses.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/rtc/rtc-omap.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 7f9ee559dd99..323ff55cc165 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -583,9 +583,7 @@ static int rtc_pinconf_get(struct pinctrl_dev *pctldev,
 	u32 val;
 	u16 arg = 0;
 
-	rtc->type->unlock(rtc);
 	val = rtc_readl(rtc, OMAP_RTC_PMIC_REG);
-	rtc->type->lock(rtc);
 
 	switch (param) {
 	case PIN_CONFIG_INPUT_ENABLE:
@@ -615,9 +613,7 @@ static int rtc_pinconf_set(struct pinctrl_dev *pctldev,
 	u32 param_val;
 	int i;
 
-	rtc->type->unlock(rtc);
 	val = rtc_readl(rtc, OMAP_RTC_PMIC_REG);
-	rtc->type->lock(rtc);
 
 	/* active low by default */
 	val |= OMAP_RTC_PMIC_EXT_WKUP_POL(pin);
-- 
2.18.0

  parent reply	other threads:[~2018-07-04  9:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04  9:05 [PATCH 0/4] rtc: omap: fixes and clean ups Johan Hovold
2018-07-04  9:05 ` [PATCH 1/4] rtc: omap: fix potential crash on power off Johan Hovold
2018-07-05  8:31   ` Tony Lindgren
2018-07-09  9:13   ` Marcin Niestroj
2018-07-04  9:05 ` [PATCH 2/4] rtc: omap: fix resource leak in registration error path Johan Hovold
2018-07-04  9:05 ` [PATCH 3/4] rtc: omap: add missing register lock in " Johan Hovold
2018-07-04  9:05 ` Johan Hovold [this message]
2018-07-12 18:33 ` [PATCH 0/4] rtc: omap: fixes and clean ups 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=20180704090558.16647-5-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=j-keerthy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.