summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-01-24 17:02:03 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-02-12 11:00:55 +0100
commitf067372c6a3c3b0c5cc775157408970b8fa6c010 (patch)
tree0d3d05240412387176e1ba2c426e46726ab380bb /drivers/gpio/gpiolib.h
parentd83cee3d2bb131c7fca7e19f1e33dc7530fd7083 (diff)
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.h')
-rw-r--r--drivers/gpio/gpiolib.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index b3810f7d286a..07443d26cbca 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -16,7 +16,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/notifier.h>
-#include <linux/rwsem.h>
#include <linux/srcu.h>
#define GPIOCHIP_NAME "gpiochip"
@@ -46,9 +45,6 @@
* requested, released or reconfigured
* @device_notifier: used to notify character device wait queues about the GPIO
* device being unregistered
- * @sem: protects the structure from a NULL-pointer dereference of @chip by
- * user-space operations when the device gets unregistered during
- * a hot-unplug event
* @srcu: protects the pointer to the underlying GPIO chip
* @pin_ranges: range of pins served by the GPIO driver
*
@@ -73,7 +69,6 @@ struct gpio_device {
struct list_head list;
struct blocking_notifier_head line_state_notifier;
struct blocking_notifier_head device_notifier;
- struct rw_semaphore sem;
struct srcu_struct srcu;
#ifdef CONFIG_PINCTRL