diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-01-24 17:02:03 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-02-12 11:00:55 +0100 |
commit | f067372c6a3c3b0c5cc775157408970b8fa6c010 (patch) | |
tree | 0d3d05240412387176e1ba2c426e46726ab380bb /drivers/gpio/gpiolib.c | |
parent | d83cee3d2bb131c7fca7e19f1e33dc7530fd7083 (diff) | |
download | linux-stable-f067372c6a3c3b0c5cc775157408970b8fa6c010.tar.gz linux-stable-f067372c6a3c3b0c5cc775157408970b8fa6c010.tar.bz2 linux-stable-f067372c6a3c3b0c5cc775157408970b8fa6c010.zip |
gpio: remove the RW semaphore from the GPIO device
With all accesses to gdev->chip being protected with SRCU, we can now
remove the RW-semaphore specific to the character device which
fulfilled the same role up to this point.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 1a9d045b5a6b..875b40376c0b 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -963,7 +963,6 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, BLOCKING_INIT_NOTIFIER_HEAD(&gdev->line_state_notifier); BLOCKING_INIT_NOTIFIER_HEAD(&gdev->device_notifier); - init_rwsem(&gdev->sem); ret = init_srcu_struct(&gdev->srcu); if (ret) @@ -1102,8 +1101,6 @@ void gpiochip_remove(struct gpio_chip *gc) struct gpio_device *gdev = gc->gpiodev; unsigned int i; - down_write(&gdev->sem); - /* FIXME: should the legacy sysfs handling be moved to gpio_device? */ gpiochip_sysfs_unregister(gdev); gpiochip_free_hogs(gc); @@ -1142,7 +1139,6 @@ void gpiochip_remove(struct gpio_chip *gc) * gone. */ gcdev_unregister(gdev); - up_write(&gdev->sem); gpio_device_put(gdev); } EXPORT_SYMBOL_GPL(gpiochip_remove); |