Commit cbd7d2d8 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Greg Kroah-Hartman

gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants

[ Upstream commit 3285170f ]

Commit 372e722e ("gpiolib: use descriptors internally") renamed
the functions to use a "gpiod" prefix, and commit 79a9becd
("gpiolib: export descriptor-based GPIO interface") introduced the "raw"
variants, but both changes forgot to update the comments.

Readd a similar reference to gpiod_set_value(), which was accidentally
removed by commit 1e77fc82 ("gpio: Add missing open drain/source
handling to gpiod_set_value_cansleep()").
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20190701142738.25219-1-geert+renesas@glider.beSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6ddf0813
...@@ -3012,7 +3012,7 @@ int gpiod_get_array_value_complex(bool raw, bool can_sleep, ...@@ -3012,7 +3012,7 @@ int gpiod_get_array_value_complex(bool raw, bool can_sleep,
int gpiod_get_raw_value(const struct gpio_desc *desc) int gpiod_get_raw_value(const struct gpio_desc *desc)
{ {
VALIDATE_DESC(desc); VALIDATE_DESC(desc);
/* Should be using gpio_get_value_cansleep() */ /* Should be using gpiod_get_raw_value_cansleep() */
WARN_ON(desc->gdev->chip->can_sleep); WARN_ON(desc->gdev->chip->can_sleep);
return gpiod_get_raw_value_commit(desc); return gpiod_get_raw_value_commit(desc);
} }
...@@ -3033,7 +3033,7 @@ int gpiod_get_value(const struct gpio_desc *desc) ...@@ -3033,7 +3033,7 @@ int gpiod_get_value(const struct gpio_desc *desc)
int value; int value;
VALIDATE_DESC(desc); VALIDATE_DESC(desc);
/* Should be using gpio_get_value_cansleep() */ /* Should be using gpiod_get_value_cansleep() */
WARN_ON(desc->gdev->chip->can_sleep); WARN_ON(desc->gdev->chip->can_sleep);
value = gpiod_get_raw_value_commit(desc); value = gpiod_get_raw_value_commit(desc);
...@@ -3304,7 +3304,7 @@ int gpiod_set_array_value_complex(bool raw, bool can_sleep, ...@@ -3304,7 +3304,7 @@ int gpiod_set_array_value_complex(bool raw, bool can_sleep,
void gpiod_set_raw_value(struct gpio_desc *desc, int value) void gpiod_set_raw_value(struct gpio_desc *desc, int value)
{ {
VALIDATE_DESC_VOID(desc); VALIDATE_DESC_VOID(desc);
/* Should be using gpiod_set_value_cansleep() */ /* Should be using gpiod_set_raw_value_cansleep() */
WARN_ON(desc->gdev->chip->can_sleep); WARN_ON(desc->gdev->chip->can_sleep);
gpiod_set_raw_value_commit(desc, value); gpiod_set_raw_value_commit(desc, value);
} }
...@@ -3345,6 +3345,7 @@ static void gpiod_set_value_nocheck(struct gpio_desc *desc, int value) ...@@ -3345,6 +3345,7 @@ static void gpiod_set_value_nocheck(struct gpio_desc *desc, int value)
void gpiod_set_value(struct gpio_desc *desc, int value) void gpiod_set_value(struct gpio_desc *desc, int value)
{ {
VALIDATE_DESC_VOID(desc); VALIDATE_DESC_VOID(desc);
/* Should be using gpiod_set_value_cansleep() */
WARN_ON(desc->gdev->chip->can_sleep); WARN_ON(desc->gdev->chip->can_sleep);
gpiod_set_value_nocheck(desc, value); gpiod_set_value_nocheck(desc, value);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment