Skip to content

Commit

Permalink
pinctrl: sunxi: Add const qualifier to the pin descriptor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard committed May 4, 2014
1 parent fd67f88 commit d39bd84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-sunxi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d39bd84

Please sign in to comment.