Re: [PATCH] gpio: altera-a10sr: constify gpio_chip structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 07/13/2017 12:41 PM, Thor Thayer wrote:
On 07/11/2017 05:15 PM, Gustavo A. R. Silva wrote:
This structure is only used to copy into another structure, so declare
it as const.

<snip>

Signed-off-by: Gustavo A. R. Silva <garsilva@xxxxxxxxxxxxxx>
---
  drivers/gpio/gpio-altera-a10sr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-altera-a10sr.c b/drivers/gpio/gpio-altera-a10sr.c
index 16a8951..6b11f13 100644
--- a/drivers/gpio/gpio-altera-a10sr.c
+++ b/drivers/gpio/gpio-altera-a10sr.c
@@ -71,7 +71,7 @@ static int altr_a10sr_gpio_direction_output(struct gpio_chip *gc,
      return -EINVAL;
  }
  -static struct gpio_chip altr_a10sr_gc = {
+static const struct gpio_chip altr_a10sr_gc = {
      .label = "altr_a10sr_gpio",
      .owner = THIS_MODULE,
      .get = altr_a10sr_gpio_get,

Reviewed-by: Thor Thayer <thor.thayer@xxxxxxxxxxxxxxx>

Thank you, Thor.

--
Gustavo A. R. Silva

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux