Skip to content
Commit c0162a49 authored by Linus Walleij's avatar Linus Walleij
Browse files

gpio: amd-fch: Drop const from resource



The build servers and linux-next are complaining like this:

drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe':
drivers/gpio/gpio-amd-fch.c:164:49: warning: passing argument 2 of
'devm_ioremap_resource' discards 'const' qualifier from pointer
target type [-Wdiscarded-qualifiers]
priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores);
                                               ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/platform_device.h:14, from
drivers/gpio/gpio-amd-fch.c:15:
include/linux/device.h:709:15: note: expected 'struct resource *'
but argument is of type 'const struct resource *'
 void __iomem *devm_ioremap_resource(struct device *dev,struct resource *res);
               ^~~~~~~~~~~~~~~~~~~~~

Let's just remove "const" for now.

It is possible that devm_ioremap_resource() should rather
be constified so we can pass const resources as arguments.
But right now I just want to get rid of this build warning.

Fixes: e09d168f ("gpio: AMD G-Series PCH gpio driver")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Reported-by: default avatarAnders Roxell <anders.roxell@linaro.org>
Cc: Enrico Weigelt <info@metux.net>
Tested-by: default avatarAnders Roxell <anders.roxell@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a329bbe7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment