OSDN Git Service

rtc: omap: drop unnecessary register unlock around reads
authorJohan Hovold <johan@kernel.org>
Wed, 4 Jul 2018 09:05:58 +0000 (11:05 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 12 Jul 2018 18:31:21 +0000 (20:31 +0200)
Drop unnecessary register write-unlock around two read accesses.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-omap.c

index 7f9ee55..323ff55 100644 (file)
@@ -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);