2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 00:34:10 +08:00

pinctrl: mvebu: Fix compiler warnings

match->data is const void * where as dev.platform_data is just void *.
Add a cast to remove the const, which is causing the compiler warning:

drivers/pinctrl/mvebu/pinctrl-kirkwood.c:461:26: warning: assignment
discards 'const' qualifier from pointer target type

Dove has the exact same warning, so gets the same cast.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Andrew Lunn 2013-01-09 19:28:09 +01:00 committed by Linus Walleij
parent 4b090d8dff
commit 16fa36be89
2 changed files with 2 additions and 2 deletions

View File

@ -588,7 +588,7 @@ static int dove_pinctrl_probe(struct platform_device *pdev)
{
const struct of_device_id *match =
of_match_device(dove_pinctrl_of_match, &pdev->dev);
pdev->dev.platform_data = match->data;
pdev->dev.platform_data = (void *)match->data;
/*
* General MPP Configuration Register is part of pdma registers.

View File

@ -458,7 +458,7 @@ static int kirkwood_pinctrl_probe(struct platform_device *pdev)
{
const struct of_device_id *match =
of_match_device(kirkwood_pinctrl_of_match, &pdev->dev);
pdev->dev.platform_data = match->data;
pdev->dev.platform_data = (void *)match->data;
return mvebu_pinctrl_probe(pdev);
}