linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpiolib: constify label in gpio_device
@ 2017-12-13 11:25 Bartosz Golaszewski
  2017-12-13 11:25 ` [PATCH 2/2] gpiolib: use kstrdup_const() for gpio_device label Bartosz Golaszewski
  2017-12-20  8:02 ` [PATCH 1/2] gpiolib: constify label in gpio_device Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2017-12-13 11:25 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

This string is never modified. Make it const.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
 drivers/gpio/gpiolib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 5e1f7cc6eeb6..6e9228b94437 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -58,7 +58,7 @@ struct gpio_device {
 	struct gpio_desc	*descs;
 	int			base;
 	u16			ngpio;
-	char			*label;
+	const char		*label;
 	void			*data;
 	struct list_head        list;
 
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-20  8:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13 11:25 [PATCH 1/2] gpiolib: constify label in gpio_device Bartosz Golaszewski
2017-12-13 11:25 ` [PATCH 2/2] gpiolib: use kstrdup_const() for gpio_device label Bartosz Golaszewski
2017-12-13 19:44   ` Joe Perches
2017-12-14 14:30     ` Bartosz Golaszewski
2017-12-20  8:02 ` [PATCH 1/2] gpiolib: constify label in gpio_device 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).