pinctrl: armada-37xx: account for const type of of_device_id.data
authorJulia Lawall <Julia.Lawall@lip6.fr>
Tue, 2 Jan 2018 13:28:01 +0000 (14:28 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 8 Jan 2018 07:15:48 +0000 (08:15 +0100)
The data field of an of_device_id structure has type const void *, so
there is no need for a const-discarding cast when putting const values
into such a structure.

Done using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c

index d45af31b86b41ef6c85591a040fe2dd46c60de3e..7edebd1e8c291509e27613d29b499d8d777c9593 100644 (file)
@@ -997,11 +997,11 @@ static int armada_37xx_pinctrl_register(struct platform_device *pdev,
 static const struct of_device_id armada_37xx_pinctrl_of_match[] = {
        {
                .compatible = "marvell,armada3710-sb-pinctrl",
-               .data = (void *)&armada_37xx_pin_sb,
+               .data = &armada_37xx_pin_sb,
        },
        {
                .compatible = "marvell,armada3710-nb-pinctrl",
-               .data = (void *)&armada_37xx_pin_nb,
+               .data = &armada_37xx_pin_nb,
        },
        { },
 };