* [PATCH v2] gpio: fix constconst in devres
@ 2015-03-11 12:43 Linus Walleij
0 siblings, 0 replies; only message in thread
From: Linus Walleij @ 2015-03-11 12:43 UTC (permalink / raw)
To: linux-gpio
Cc: Alexandre Courbot, Linus Walleij, Olliver Schinagl,
Rojhalat Ibrahim
Commit 1feb57a245a4910b03202a814ffc51a900bd4aca
"gpio: add parameter to allow the use named gpios"
includes a double-consted array. What we want is not
const const * but const * const (const pointer to const
data). Fix this.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Olliver Schinagl <oliver@schinagl.nl>
Cc: Rojhalat Ibrahim <imr@rtschenk.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Const pointer to const data is what we want.
---
drivers/gpio/devres.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c
index ec24da2418b3..07ba82317ece 100644
--- a/drivers/gpio/devres.c
+++ b/drivers/gpio/devres.c
@@ -135,7 +135,7 @@ struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
const char *con_id,
struct fwnode_handle *child)
{
- static const char const *suffixes[] = { "gpios", "gpio" };
+ static const char * const suffixes[] = { "gpios", "gpio" };
char prop_name[32]; /* 32 is max size of property name */
struct gpio_desc **dr;
struct gpio_desc *desc;
--
1.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-11 12:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11 12:43 [PATCH v2] gpio: fix constconst in devres Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).