Skip to content

Commit

Permalink
pinctrl: mvebu: Fix compiler warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Lunn authored and Linus Walleij committed Jan 18, 2013
1 parent 4b090d8 commit 16fa36b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pinctrl/mvebu/pinctrl-dove.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/mvebu/pinctrl-kirkwood.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 16fa36b

Please sign in to comment.