Skip to content

Commit bb5ad5e

Browse files
Haibo ChenBartosz Golaszewski
authored andcommitted
gpio: vf610: switch to dynamic allocat GPIO base
gpiolib want to get completely rid of static gpiobase allocation, so switch to dynamic allocat GPIO base, also can avoid warning message: [ 1.529974] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. Signed-off-by: Haibo Chen <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 9ce4ed5 commit bb5ad5e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpio/gpio-vf610.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ static void vf610_gpio_disable_clk(void *data)
258258
static int vf610_gpio_probe(struct platform_device *pdev)
259259
{
260260
struct device *dev = &pdev->dev;
261-
struct device_node *np = dev->of_node;
262261
struct vf610_gpio_port *port;
263262
struct gpio_chip *gc;
264263
struct gpio_irq_chip *girq;
@@ -318,7 +317,7 @@ static int vf610_gpio_probe(struct platform_device *pdev)
318317
gc->parent = dev;
319318
gc->label = dev_name(dev);
320319
gc->ngpio = VF610_GPIO_PER_PORT;
321-
gc->base = of_alias_get_id(np, "gpio") * VF610_GPIO_PER_PORT;
320+
gc->base = -1;
322321

323322
gc->request = gpiochip_generic_request;
324323
gc->free = gpiochip_generic_free;

0 commit comments

Comments
 (0)