pinctrl: sunxi: Add const qualifier to the pin descriptor
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 18 Apr 2014 17:34:07 +0000 (19:34 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Sun, 4 May 2014 06:59:02 +0000 (23:59 -0700)
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: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/pinctrl/pinctrl-sunxi.c
drivers/pinctrl/pinctrl-sunxi.h

index f086509a28d35c4247f81d097b28c5d536853365..f41c312673f41f96917be7ce08afa73d7327c405 100644 (file)
@@ -812,7 +812,7 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
        if (!device)
                return -ENODEV;
 
-       pctl->desc = (struct sunxi_pinctrl_desc *)device->data;
+       pctl->desc = device->data;
 
        ret = sunxi_pinctrl_build_state(pdev);
        if (ret) {
index 35d15b229a70755c18d8917f687883f25ebc69b5..90040accb11c1e2b389322e4eea07e113d75b39b 100644 (file)
@@ -468,7 +468,7 @@ struct sunxi_pinctrl_group {
 struct sunxi_pinctrl {
        void __iomem                    *membase;
        struct gpio_chip                *chip;
-       struct sunxi_pinctrl_desc       *desc;
+       const struct sunxi_pinctrl_desc *desc;
        struct device                   *dev;
        struct irq_domain               *domain;
        struct sunxi_pinctrl_function   *functions;
This page took 0.025854 seconds and 5 git commands to generate.