summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-devres.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-07-28 16:42:28 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2021-08-05 21:21:58 +0200
commite6ae9a833ef4043b940954b8dcac31493706b9d6 (patch)
tree60a299b7d175676a47d8d000818dd68d5235b991 /drivers/gpio/gpiolib-devres.c
parenta065d5615fc83908ef21ed8159ffb63d816ff5de (diff)
gpiolib: constify passed device_node pointer
Several gpiolib functions receive pointer to struct device_node which is later passed to OF functions. These OF functions accept already pointer to const, so gpiolib can follow similar approach to indicate they are not modifying the struct device_node. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpiolib-devres.c')
-rw-r--r--drivers/gpio/gpiolib-devres.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-devres.c b/drivers/gpio/gpiolib-devres.c
index 4a517e5dedf0..79da85d17b71 100644
--- a/drivers/gpio/gpiolib-devres.c
+++ b/drivers/gpio/gpiolib-devres.c
@@ -145,7 +145,7 @@ EXPORT_SYMBOL_GPL(devm_gpiod_get_index);
* In case of error an ERR_PTR() is returned.
*/
struct gpio_desc *devm_gpiod_get_from_of_node(struct device *dev,
- struct device_node *node,
+ const struct device_node *node,
const char *propname, int index,
enum gpiod_flags dflags,
const char *label)