diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2018-05-25 19:54:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-01 12:17:05 +0300 |
commit | 7efcce04309260e8088e89ca2c0a33cff452ac5c (patch) | |
tree | 7aec3ef2f099c72ee211ee52ca073eef7c514f46 /drivers/staging | |
parent | e119216dea2dd7c78e231c06b9822072bb4a553e (diff) | |
download | linux-7efcce04309260e8088e89ca2c0a33cff452ac5c.tar.xz |
staging: mt7621-gpio: avoid locking in mediatek_gpio_get_direction
mediatek_gpio_get_direction function is holding across a simple read
which it seems to be not neccessary at all. Just remove this locking
cleaning code of this function a bit.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/mt7621-gpio/gpio-mt7621.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c b/drivers/staging/mt7621-gpio/gpio-mt7621.c index 79452eb7a654..143268a866c2 100644 --- a/drivers/staging/mt7621-gpio/gpio-mt7621.c +++ b/drivers/staging/mt7621-gpio/gpio-mt7621.c @@ -129,12 +129,7 @@ static int mediatek_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) { struct mtk_gc *rg = to_mediatek_gpio(chip); - unsigned long flags; - u32 t; - - spin_lock_irqsave(&rg->lock, flags); - t = mtk_gpio_r32(rg, GPIO_REG_CTRL); - spin_unlock_irqrestore(&rg->lock, flags); + u32 t = mtk_gpio_r32(rg, GPIO_REG_CTRL); return (t & BIT(offset)) ? 0 : 1; } |