提交 b9cfb3d1 编写于 作者: J Johan Hovold 提交者: Alexandre Belloni

rtc: omap: drop unnecessary register unlock around reads

Drop unnecessary register write-unlock around two read accesses.
Signed-off-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
上级 4425070a
...@@ -583,9 +583,7 @@ static int rtc_pinconf_get(struct pinctrl_dev *pctldev, ...@@ -583,9 +583,7 @@ static int rtc_pinconf_get(struct pinctrl_dev *pctldev,
u32 val; u32 val;
u16 arg = 0; u16 arg = 0;
rtc->type->unlock(rtc);
val = rtc_readl(rtc, OMAP_RTC_PMIC_REG); val = rtc_readl(rtc, OMAP_RTC_PMIC_REG);
rtc->type->lock(rtc);
switch (param) { switch (param) {
case PIN_CONFIG_INPUT_ENABLE: case PIN_CONFIG_INPUT_ENABLE:
...@@ -615,9 +613,7 @@ static int rtc_pinconf_set(struct pinctrl_dev *pctldev, ...@@ -615,9 +613,7 @@ static int rtc_pinconf_set(struct pinctrl_dev *pctldev,
u32 param_val; u32 param_val;
int i; int i;
rtc->type->unlock(rtc);
val = rtc_readl(rtc, OMAP_RTC_PMIC_REG); val = rtc_readl(rtc, OMAP_RTC_PMIC_REG);
rtc->type->lock(rtc);
/* active low by default */ /* active low by default */
val |= OMAP_RTC_PMIC_EXT_WKUP_POL(pin); val |= OMAP_RTC_PMIC_EXT_WKUP_POL(pin);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册