aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-rza1.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-11-13 09:38:35 +0100
committerGeert Uytterhoeven <geert+renesas@glider.be>2019-04-02 09:57:50 +0200
commite005da0ef77e3b4426a6d0a0289fd1b74a5738f0 (patch)
tree65b136ced5b419718ba5f168f2d6551590636d0a /drivers/pinctrl/pinctrl-rza1.c
parentpinctrl: sh-pfc: Validate enum IDs for regs with variable-width fields (diff)
downloadlinux-dev-e005da0ef77e3b4426a6d0a0289fd1b74a5738f0.tar.xz
linux-dev-e005da0ef77e3b4426a6d0a0289fd1b74a5738f0.zip
pinctrl: rza1: Remove unneeded spinlock acquisitions
rza1_get_bit() is just a single register read. Hence there's no need to synchronize it with other register writes to the same bank. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-rza1.c')
-rw-r--r--drivers/pinctrl/pinctrl-rza1.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
index 9cfe9d0520ac..021e37b7689e 100644
--- a/drivers/pinctrl/pinctrl-rza1.c
+++ b/drivers/pinctrl/pinctrl-rza1.c
@@ -620,14 +620,7 @@ static void rza1_pin_reset(struct rza1_port *port, unsigned int pin)
static inline int rza1_pin_get_direction(struct rza1_port *port,
unsigned int pin)
{
- unsigned long irqflags;
- int input;
-
- spin_lock_irqsave(&port->lock, irqflags);
- input = rza1_get_bit(port, RZA1_PM_REG, pin);
- spin_unlock_irqrestore(&port->lock, irqflags);
-
- return !!input;
+ return !!rza1_get_bit(port, RZA1_PM_REG, pin);
}
/**
@@ -671,14 +664,7 @@ static inline void rza1_pin_set(struct rza1_port *port, unsigned int pin,
static inline int rza1_pin_get(struct rza1_port *port, unsigned int pin)
{
- unsigned long irqflags;
- int val;
-
- spin_lock_irqsave(&port->lock, irqflags);
- val = rza1_get_bit(port, RZA1_PPR_REG, pin);
- spin_unlock_irqrestore(&port->lock, irqflags);
-
- return val;
+ return rza1_get_bit(port, RZA1_PPR_REG, pin);
}
/**