linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: zevio: make gpio_chip const
@ 2017-08-20 18:27 Bhumika Goyal
  2017-08-23  7:22 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-20 18:27 UTC (permalink / raw)
  To: julia.lawall, linus.walleij, linux-gpio, linux-kernel; +Cc: Bhumika Goyal

Make this const as it is only used as a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/gpio/gpio-zevio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-zevio.c b/drivers/gpio/gpio-zevio.c
index e23ef7b..3926ce9 100644
--- a/drivers/gpio/gpio-zevio.c
+++ b/drivers/gpio/gpio-zevio.c
@@ -156,7 +156,7 @@ static int zevio_gpio_to_irq(struct gpio_chip *chip, unsigned pin)
 	return -ENXIO;
 }
 
-static struct gpio_chip zevio_gpio_chip = {
+static const struct gpio_chip zevio_gpio_chip = {
 	.direction_input	= zevio_gpio_direction_input,
 	.direction_output	= zevio_gpio_direction_output,
 	.set			= zevio_gpio_set,
-- 
1.9.1

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

* Re: [PATCH] gpio: zevio: make gpio_chip const
  2017-08-20 18:27 [PATCH] gpio: zevio: make gpio_chip const Bhumika Goyal
@ 2017-08-23  7:22 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2017-08-23  7:22 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: Julia Lawall, linux-gpio, linux-kernel

On Sun, Aug 20, 2017 at 8:27 PM, Bhumika Goyal <bhumirks@gmail.com> wrote:

> Make this const as it is only used as a copy operation.
> Done using Coccinelle.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2017-08-23  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-20 18:27 [PATCH] gpio: zevio: make gpio_chip const Bhumika Goyal
2017-08-23  7:22 ` 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).