Commit d39bd845 authored by Maxime Ripard's avatar Maxime Ripard

pinctrl: sunxi: Add const qualifier to the pin descriptor

The pins description structure were declared as const, but the of_device_id
data magic was losing it silently.

Make sure we have it on both sides.

And now that we're using const, we can also remove the useless cast in probe.
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent fd67f884
...@@ -812,7 +812,7 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev) ...@@ -812,7 +812,7 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
if (!device) if (!device)
return -ENODEV; return -ENODEV;
pctl->desc = (struct sunxi_pinctrl_desc *)device->data; pctl->desc = device->data;
ret = sunxi_pinctrl_build_state(pdev); ret = sunxi_pinctrl_build_state(pdev);
if (ret) { if (ret) {
......
...@@ -468,7 +468,7 @@ struct sunxi_pinctrl_group { ...@@ -468,7 +468,7 @@ struct sunxi_pinctrl_group {
struct sunxi_pinctrl { struct sunxi_pinctrl {
void __iomem *membase; void __iomem *membase;
struct gpio_chip *chip; struct gpio_chip *chip;
struct sunxi_pinctrl_desc *desc; const struct sunxi_pinctrl_desc *desc;
struct device *dev; struct device *dev;
struct irq_domain *domain; struct irq_domain *domain;
struct sunxi_pinctrl_function *functions; struct sunxi_pinctrl_function *functions;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment