gpiolib: Do not alter GPIO chip fwnode member
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Jul 2023 14:23:08 +0000 (17:23 +0300)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 10 Jul 2023 09:26:23 +0000 (11:26 +0200)
commitdaecca4b8433d47f0db4933bcc0f283d530ba22e
tree0e6f90c19484b829a5ee09b17e9fab0293ccb66e
parent067dbc1ea5ce61ba174d0c5f2e375defe4d562e6
gpiolib: Do not alter GPIO chip fwnode member

Ideally we should not touch data in the given GPIO chip structure.
Let's become closer to it by avoiding altering fwnode member.

The GPIO library must use fwnode from GPIO device and the drivers
might use one from GPIO chip in case they initialized it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Benjamin Tissoires <bentiss@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib.c