pinctrl: mvebu: Fix compiler warnings
Subsystems (2)
Andrew Lunn
maintainerPATCH 1/1 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.
--- drivers/pinctrl/mvebu/pinctrl-dove.c | 2 +- drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/mvebu/pinctrl-dove.c +1 -1
@@ -588,7 +588,7 @@ static int __devinit 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.
drivers/pinctrl/mvebu/pinctrl-kirkwood.c +1 -1
@@ -458,7 +458,7 @@ static int __devinit 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); }
Signature · 1 line
1.7.10.4
PATCH 1/1 pinctrl: mvebu: Fix compiler warnings
Quoted 9 lines · Andrew Lunn
match->datais 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 typeDove has the exact same warning, so gets the same cast.
Signed-off-by Andrew Lunn <[email protected]>
thx,
Jason.
PATCH 1/1 pinctrl: mvebu: Fix compiler warnings
In reply to Andrew LunnQuoted 9 lines · Andrew Lunn
match->datais 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 typeDove has the exact same warning, so gets the same cast.
Signed-off-by Andrew Lunn <[email protected]>
Applied with Jason's ACK.
Thanks!
Linus Walleij