[02/10] gpio: pxa: use dynamic allocation of base

Message ID 20230721210042.21535-3-duje.mihanovic@skole.hr
State New
Headers
Series Initial Marvell PXA1908 support |

Commit Message

Duje Mihanović July 21, 2023, 8:37 p.m. UTC
  Fixes the warning in dmesg that static allocation of the base is
deprecated.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
 drivers/gpio/gpio-pxa.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

andy@kernel.org July 24, 2023, 9 a.m. UTC | #1
On Fri, Jul 21, 2023 at 10:37:44PM +0200, Duje Mihanović wrote:
> Fixes the warning in dmesg that static allocation of the base is
> deprecated.

Have you checked if this might regress on the older platforms where maybe
drivers that are looking for the specific GPIO number?

Please, elaborate the answer to the above in the commit message (in case you
have done the research, otherwise do that first).

The background of this request is the OMAP breakage in the previous cycle
due to the very similar change. We don't want to repeat our mistakes.
  

Patch

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index a1630ed4b741..076ee6dff4d5 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -350,6 +350,7 @@  static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio, void __iom
 
 	pchip->chip.parent = pchip->dev;
 	pchip->chip.label = "gpio-pxa";
+	pchip->chip.base = -1;
 	pchip->chip.direction_input  = pxa_gpio_direction_input;
 	pchip->chip.direction_output = pxa_gpio_direction_output;
 	pchip->chip.get = pxa_gpio_get;