mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 19:23:57 +08:00
ARM: 6177/1: nomadik-gpio: fix "ignoring return value" warning
arch/arm/plat-nomadik/gpio.c: In function 'nmk_gpio_remove': arch/arm/plat-nomadik/gpio.c:630: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result Because this function is marked __exit and this code can't be built as a module, this function is never used. So just remove it, fixing the warning in the process. Acked-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
0d2aec9cd3
commit
f6aa01c2b8
@ -619,30 +619,12 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __exit nmk_gpio_remove(struct platform_device *dev)
|
|
||||||
{
|
|
||||||
struct nmk_gpio_chip *nmk_chip;
|
|
||||||
struct resource *res;
|
|
||||||
|
|
||||||
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
|
|
||||||
|
|
||||||
nmk_chip = platform_get_drvdata(dev);
|
|
||||||
gpiochip_remove(&nmk_chip->chip);
|
|
||||||
clk_disable(nmk_chip->clk);
|
|
||||||
clk_put(nmk_chip->clk);
|
|
||||||
kfree(nmk_chip);
|
|
||||||
release_mem_region(res->start, resource_size(res));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static struct platform_driver nmk_gpio_driver = {
|
static struct platform_driver nmk_gpio_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.name = "gpio",
|
.name = "gpio",
|
||||||
},
|
},
|
||||||
.probe = nmk_gpio_probe,
|
.probe = nmk_gpio_probe,
|
||||||
.remove = __exit_p(nmk_gpio_remove),
|
|
||||||
.suspend = NULL, /* to be done */
|
.suspend = NULL, /* to be done */
|
||||||
.resume = NULL,
|
.resume = NULL,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user