* [PATCH] pinctrl: mvebu: Fix compiler warnings
@ 2013-01-09 18:28 Andrew Lunn
2013-01-09 20:55 ` Jason Cooper
2013-01-18 19:32 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Lunn @ 2013-01-09 18:28 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/pinctrl/mvebu/pinctrl-dove.c | 2 +-
drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c
index 40c9c3e..f2757df 100644
--- a/drivers/pinctrl/mvebu/pinctrl-dove.c
+++ b/drivers/pinctrl/mvebu/pinctrl-dove.c
@@ -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.
diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
index fa6ce31..33b1c49 100644
--- a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
+++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
@@ -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);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] pinctrl: mvebu: Fix compiler warnings
2013-01-09 18:28 [PATCH] pinctrl: mvebu: Fix compiler warnings Andrew Lunn
@ 2013-01-09 20:55 ` Jason Cooper
2013-01-18 19:32 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Jason Cooper @ 2013-01-09 20:55 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 09, 2013 at 07:28:09PM +0100, Andrew Lunn wrote:
> 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>
thx,
Jason.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] pinctrl: mvebu: Fix compiler warnings
2013-01-09 18:28 [PATCH] pinctrl: mvebu: Fix compiler warnings Andrew Lunn
2013-01-09 20:55 ` Jason Cooper
@ 2013-01-18 19:32 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-01-18 19:32 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 9, 2013 at 7:28 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> 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>
Applied with Jason's ACK.
Thanks!
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-18 19:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09 18:28 [PATCH] pinctrl: mvebu: Fix compiler warnings Andrew Lunn
2013-01-09 20:55 ` Jason Cooper
2013-01-18 19:32 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).