[1/2] drivers: gpio: amd-fch: make resource struct const
diff mbox series

Message ID 1560787211-15443-1-git-send-email-info@metux.net
State New
Headers show
Series
  • [1/2] drivers: gpio: amd-fch: make resource struct const
Related show

Commit Message

Enrico Weigelt, metux IT consult June 17, 2019, 4 p.m. UTC
From: Enrico Weigelt <info@metux.net>

The struct resource field is statically initialized
and may never change. Therefore make it const.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/gpio/gpio-amd-fch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij June 25, 2019, 9 a.m. UTC | #1
On Mon, Jun 17, 2019 at 6:00 PM Enrico Weigelt, metux IT consult
<info@metux.net> wrote:

> From: Enrico Weigelt <info@metux.net>
>
> The struct resource field is statically initialized
> and may never change. Therefore make it const.
>
> Signed-off-by: Enrico Weigelt <info@metux.net>

Patch applied.

When making GPIO patches please make the
subject just:

"gpio: driver: Fix foo"

Yours,
Linus Walleij

Patch
diff mbox series

diff --git a/drivers/gpio/gpio-amd-fch.c b/drivers/gpio/gpio-amd-fch.c
index 38c3f4a..390a8b8 100644
--- a/drivers/gpio/gpio-amd-fch.c
+++ b/drivers/gpio/gpio-amd-fch.c
@@ -25,7 +25,7 @@ 
 #define AMD_FCH_GPIO_FLAG_WRITE		BIT(22)
 #define AMD_FCH_GPIO_FLAG_READ		BIT(16)
 
-static struct resource amd_fch_gpio_iores =
+static const struct resource amd_fch_gpio_iores =
 	DEFINE_RES_MEM_NAMED(
 		AMD_FCH_MMIO_BASE + AMD_FCH_GPIO_BANK0_BASE,
 		AMD_FCH_GPIO_SIZE,