gpio: cdev: use correct pointer accessors with SRCU
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 14 Feb 2024 08:44:17 +0000 (09:44 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 15 Feb 2024 07:39:18 +0000 (08:39 +0100)
commit8574b5b47610df22048adcdabf318ca983024f28
treeb42bbe23358c85af4b91692d40a64ddbf23b080c
parent815a1b5a6da4bedb29a1e15a94a042e525b0ba96
gpio: cdev: use correct pointer accessors with SRCU

We never dereference the chip pointer in character device code so we can
use the lighter rcu_access_pointer() helper. This also makes lockep
happier as it no longer complains about suspicious rcu_dereference()
usage.

Fixes: d83cee3d2bb1 ("gpio: protect the pointer to gpio_chip in gpio_device with SRCU")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202402122234.d85cca9b-lkp@intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
drivers/gpio/gpiolib-cdev.c