linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const
@ 2019-06-17 16:00 Enrico Weigelt, metux IT consult
  2019-06-17 16:00 ` [PATCH 2/2] drivers: gpio: amd-fch: drop unused pdev pointer in privata data Enrico Weigelt, metux IT consult
  2019-06-25  9:00 ` [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-17 16:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: info, linus.walleij, bgolaszewski, linux-gpio

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(-)

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,
-- 
1.9.1


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

* [PATCH 2/2] drivers: gpio: amd-fch: drop unused pdev pointer in privata data
  2019-06-17 16:00 [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const Enrico Weigelt, metux IT consult
@ 2019-06-17 16:00 ` Enrico Weigelt, metux IT consult
  2019-06-25  9:01   ` Linus Walleij
  2019-06-25  9:00 ` [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const Linus Walleij
  1 sibling, 1 reply; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-17 16:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: info, linus.walleij, bgolaszewski, linux-gpio

From: Enrico Weigelt <info@metux.net>

The pointer to the struct platform_device in the driver's private
data struct is never used and therefore can be dropped.

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

diff --git a/drivers/gpio/gpio-amd-fch.c b/drivers/gpio/gpio-amd-fch.c
index 390a8b8..181df15 100644
--- a/drivers/gpio/gpio-amd-fch.c
+++ b/drivers/gpio/gpio-amd-fch.c
@@ -32,7 +32,6 @@
 		"amd-fch-gpio-iomem");
 
 struct amd_fch_gpio_priv {
-	struct platform_device		*pdev;
 	struct gpio_chip		gc;
 	void __iomem			*base;
 	struct amd_fch_gpio_pdata	*pdata;
@@ -153,7 +152,6 @@ static int amd_fch_gpio_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	priv->pdata	= pdata;
-	priv->pdev	= pdev;
 
 	priv->gc.owner			= THIS_MODULE;
 	priv->gc.parent			= &pdev->dev;
-- 
1.9.1


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

* Re: [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const
  2019-06-17 16:00 [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const Enrico Weigelt, metux IT consult
  2019-06-17 16:00 ` [PATCH 2/2] drivers: gpio: amd-fch: drop unused pdev pointer in privata data Enrico Weigelt, metux IT consult
@ 2019-06-25  9:00 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-06-25  9:00 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, Bartosz Golaszewski, open list:GPIO SUBSYSTEM

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

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

* Re: [PATCH 2/2] drivers: gpio: amd-fch: drop unused pdev pointer in privata data
  2019-06-17 16:00 ` [PATCH 2/2] drivers: gpio: amd-fch: drop unused pdev pointer in privata data Enrico Weigelt, metux IT consult
@ 2019-06-25  9:01   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-06-25  9:01 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, Bartosz Golaszewski, open list:GPIO SUBSYSTEM

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 pointer to the struct platform_device in the driver's private
> data struct is never used and therefore can be dropped.
>
> Signed-off-by: Enrico Weigelt <info@metux.net>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2019-06-25  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 16:00 [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const Enrico Weigelt, metux IT consult
2019-06-17 16:00 ` [PATCH 2/2] drivers: gpio: amd-fch: drop unused pdev pointer in privata data Enrico Weigelt, metux IT consult
2019-06-25  9:01   ` Linus Walleij
2019-06-25  9:00 ` [PATCH 1/2] drivers: gpio: amd-fch: make resource struct const 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).