pinctrl: rza1: Remove unneeded spinlock acquisitions
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 13 Nov 2018 08:38:35 +0000 (09:38 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 2 Apr 2019 07:57:50 +0000 (09:57 +0200)
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>
drivers/pinctrl/pinctrl-rza1.c

index 9cfe9d0520acaf619df859f82e79f66f860f3cee..021e37b7689e4fdad00501ec78822b8c4235a9c5 100644 (file)
@@ -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);
 }
 
 /**