From: Maxime Ripard Date: Fri, 18 Apr 2014 17:34:07 +0000 (+0200) Subject: pinctrl: sunxi: Add const qualifier to the pin descriptor X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d39bd8457fc057d9bf380211215684e23ff48ddd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Maxime Ripard --- diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index f086509a28d3..f41c312673f4 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -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) { diff --git a/drivers/pinctrl/pinctrl-sunxi.h b/drivers/pinctrl/pinctrl-sunxi.h index 35d15b229a70..90040accb11c 100644 --- a/drivers/pinctrl/pinctrl-sunxi.h +++ b/drivers/pinctrl/pinctrl-sunxi.h @@ -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;