Skip to content

Commit d39bd84

Browse files
committed
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 <maxime.ripard@free-electrons.com>
1 parent fd67f88 commit d39bd84

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/pinctrl/pinctrl-sunxi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ static int sunxi_pinctrl_probe(struct platform_device *pdev)
812812
if (!device)
813813
return -ENODEV;
814814

815-
pctl->desc = (struct sunxi_pinctrl_desc *)device->data;
815+
pctl->desc = device->data;
816816

817817
ret = sunxi_pinctrl_build_state(pdev);
818818
if (ret) {

‎drivers/pinctrl/pinctrl-sunxi.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ struct sunxi_pinctrl_group {
468468
struct sunxi_pinctrl {
469469
void __iomem *membase;
470470
struct gpio_chip *chip;
471-
struct sunxi_pinctrl_desc *desc;
471+
const struct sunxi_pinctrl_desc *desc;
472472
struct device *dev;
473473
struct irq_domain *domain;
474474
struct sunxi_pinctrl_function *functions;

0 commit comments

Comments
 (0)