gpio: constify opaque pointer in gpio_device_find() match function
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 8 Feb 2024 20:27:04 +0000 (21:27 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 12 Feb 2024 09:18:31 +0000 (10:18 +0100)
commitfaf6efd2e5e23d3319501132d9671c8606ef21bd
tree8b698b9a557ea0eafb984ee1dc6337c24f62702e
parent104e00bbc76fc2a0fe887649d01d9c15f0e08021
gpio: constify opaque pointer in gpio_device_find() match function

The match function used in gpio_device_find() should not modify the
contents of passed opaque pointer, because such modification would not
be necessary for actual matching and it could lead to quite unreadable,
spaghetti code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Bartosz: fix coding style in header]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h