pinctrl: constify of_device_id array
authorFabian Frederick <fabf@skynet.be>
Mon, 16 Mar 2015 19:59:09 +0000 (20:59 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 27 Mar 2015 08:58:35 +0000 (09:58 +0100)
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Acked-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
32 files changed:
drivers/pinctrl/bcm/pinctrl-bcm2835.c
drivers/pinctrl/mediatek/pinctrl-mt8135.c
drivers/pinctrl/mediatek/pinctrl-mt8173.c
drivers/pinctrl/mvebu/pinctrl-armada-370.c
drivers/pinctrl/mvebu/pinctrl-armada-375.c
drivers/pinctrl/mvebu/pinctrl-armada-38x.c
drivers/pinctrl/mvebu/pinctrl-armada-39x.c
drivers/pinctrl/mvebu/pinctrl-armada-xp.c
drivers/pinctrl/mvebu/pinctrl-kirkwood.c
drivers/pinctrl/mvebu/pinctrl-orion.c
drivers/pinctrl/pinctrl-as3722.c
drivers/pinctrl/pinctrl-at91.c
drivers/pinctrl/pinctrl-palmas.c
drivers/pinctrl/pinctrl-single.c
drivers/pinctrl/pinctrl-st.c
drivers/pinctrl/pinctrl-tz1090-pdc.c
drivers/pinctrl/pinctrl-tz1090.c
drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
drivers/pinctrl/sunxi/pinctrl-sun5i-a10s.c
drivers/pinctrl/sunxi/pinctrl-sun5i-a13.c
drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c
drivers/pinctrl/sunxi/pinctrl-sun7i-a20.c
drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c
drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c
drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
drivers/pinctrl/vt8500/pinctrl-vt8500.c
drivers/pinctrl/vt8500/pinctrl-wm8505.c
drivers/pinctrl/vt8500/pinctrl-wm8650.c
drivers/pinctrl/vt8500/pinctrl-wm8750.c
drivers/pinctrl/vt8500/pinctrl-wm8850.c

index 9aa8a3f10b105aef585406cd01991a6ffb0fc09a..4d08b850478e87b05b85d150edb751ff4739f218 100644 (file)
@@ -1051,7 +1051,7 @@ static int bcm2835_pinctrl_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct of_device_id bcm2835_pinctrl_match[] = {
+static const struct of_device_id bcm2835_pinctrl_match[] = {
        { .compatible = "brcm,bcm2835-gpio" },
        {}
 };
index b7e91c1757686ec839efc3553f76395b9315c9ae..f1e1e187ce96c0d31ba28a85f9890485d1a1f363 100644 (file)
@@ -348,7 +348,9 @@ static int mt8135_pinctrl_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id mt8135_pctrl_match[] = {
-       { .compatible = "mediatek,mt8135-pinctrl", },
+       {
+               .compatible = "mediatek,mt8135-pinctrl",
+       },
        { }
 };
 MODULE_DEVICE_TABLE(of, mt8135_pctrl_match);
index 46e4f6e7575e002ecdbb4157ca620c6160f8eab4..412ea84836a1060632a1d0a2605540e8314274b3 100644 (file)
@@ -428,7 +428,9 @@ static int mt8173_pinctrl_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id mt8173_pctrl_match[] = {
-       { .compatible = "mediatek,mt8173-pinctrl", },
+       {
+               .compatible = "mediatek,mt8173-pinctrl",
+       },
        { }
 };
 MODULE_DEVICE_TABLE(of, mt8173_pctrl_match);
index c4f51d0cd2ccec322e0ede56e1b58f5386964c20..42f930f70de31e9086d4d7f7fec78a47d83cbfcc 100644 (file)
@@ -379,7 +379,7 @@ static struct mvebu_mpp_mode mv88f6710_mpp_modes[] = {
 
 static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info;
 
-static struct of_device_id armada_370_pinctrl_of_match[] = {
+static const struct of_device_id armada_370_pinctrl_of_match[] = {
        { .compatible = "marvell,mv88f6710-pinctrl" },
        { },
 };
index cd7c8f51f7d900c9a6e5f6c0c8b940c2cde3c2f4..ca1e7571fedb51475aba33c3004d9a781b8836b1 100644 (file)
@@ -399,7 +399,7 @@ static struct mvebu_mpp_mode mv88f6720_mpp_modes[] = {
 
 static struct mvebu_pinctrl_soc_info armada_375_pinctrl_info;
 
-static struct of_device_id armada_375_pinctrl_of_match[] = {
+static const struct of_device_id armada_375_pinctrl_of_match[] = {
        { .compatible = "marvell,mv88f6720-pinctrl" },
        { },
 };
index 7302f66f4f1990d4611a096a6beb62ee4193f2e5..83bbcc72be1f8ae582f056dfe02768516dc17ec1 100644 (file)
@@ -389,7 +389,7 @@ static struct mvebu_mpp_mode armada_38x_mpp_modes[] = {
 
 static struct mvebu_pinctrl_soc_info armada_38x_pinctrl_info;
 
-static struct of_device_id armada_38x_pinctrl_of_match[] = {
+static const struct of_device_id armada_38x_pinctrl_of_match[] = {
        {
                .compatible = "marvell,mv88f6810-pinctrl",
                .data       = (void *) V_88F6810,
index 5963411988a28d9567337c3ad7d5ba3dae105af4..42491624d660d65b3c4e0772ab6a2f56dea0ee7c 100644 (file)
@@ -362,7 +362,7 @@ static struct mvebu_mpp_mode armada_39x_mpp_modes[] = {
 
 static struct mvebu_pinctrl_soc_info armada_39x_pinctrl_info;
 
-static struct of_device_id armada_39x_pinctrl_of_match[] = {
+static const struct of_device_id armada_39x_pinctrl_of_match[] = {
        {
                .compatible = "marvell,mv88f6920-pinctrl",
                .data       = (void *) V_88F6920,
index d191c3a2488578ce4bff00cf7ea517426a335d37..578db9f033b23c001257d94fe90c39a9c20ca9f1 100644 (file)
@@ -362,7 +362,7 @@ static struct mvebu_mpp_mode armada_xp_mpp_modes[] = {
 
 static struct mvebu_pinctrl_soc_info armada_xp_pinctrl_info;
 
-static struct of_device_id armada_xp_pinctrl_of_match[] = {
+static const struct of_device_id armada_xp_pinctrl_of_match[] = {
        {
                .compatible = "marvell,mv78230-pinctrl",
                .data       = (void *) V_MV78230,
index dbc673cf713135196d7514804e2c99bc5b2b4f09..0f07dc554a1dd8e977f435d7fcc925267f2fabf4 100644 (file)
@@ -456,7 +456,7 @@ static struct mvebu_pinctrl_soc_info mv98dx4122_info = {
        .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges),
 };
 
-static struct of_device_id kirkwood_pinctrl_of_match[] = {
+static const struct of_device_id kirkwood_pinctrl_of_match[] = {
        { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info },
        { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info },
        { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info },
index 3a632efb56bb7a559f97079a0878dbd652f593b7..3b7122d826e415bd6a1c5f7fbc0bbe451ab3114e 100644 (file)
@@ -211,7 +211,7 @@ static struct mvebu_pinctrl_soc_info mv88f5281_info = {
  * There are multiple variants of the Orion SoCs, but in terms of pin
  * muxing, they are identical.
  */
-static struct of_device_id orion_pinctrl_of_match[] = {
+static const struct of_device_id orion_pinctrl_of_match[] = {
        { .compatible = "marvell,88f5181l-pinctrl", .data = &mv88f5181l_info },
        { .compatible = "marvell,88f5182-pinctrl", .data = &mv88f5182_info },
        { .compatible = "marvell,88f5281-pinctrl", .data = &mv88f5281_info },
index 169b1bfa00c81931169780b2245cabebf6d5a012..db0571ffbe99e2241687384fcf779f4d4e186a4a 100644 (file)
@@ -625,7 +625,7 @@ static int as3722_pinctrl_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct of_device_id as3722_pinctrl_of_match[] = {
+static const struct of_device_id as3722_pinctrl_of_match[] = {
        { .compatible = "ams,as3722-pinctrl", },
        { },
 };
index 6cfe534ab27e31fda375b266b82061fccaa971a3..087f994dcdebd85d1c4f692f3b4813a2a50109ac 100644 (file)
@@ -1114,7 +1114,7 @@ static int at91_pinctrl_parse_functions(struct device_node *np,
        return 0;
 }
 
-static struct of_device_id at91_pinctrl_of_match[] = {
+static const struct of_device_id at91_pinctrl_of_match[] = {
        { .compatible = "atmel,sama5d3-pinctrl", .data = &sama5d3_ops },
        { .compatible = "atmel,at91sam9x5-pinctrl", .data = &at91sam9x5_ops },
        { .compatible = "atmel,at91rm9200-pinctrl", .data = &at91rm9200_ops },
@@ -1693,7 +1693,7 @@ static struct gpio_chip at91_gpio_template = {
        .ngpio                  = MAX_NB_GPIO_PER_BANK,
 };
 
-static struct of_device_id at91_gpio_of_match[] = {
+static const struct of_device_id at91_gpio_of_match[] = {
        { .compatible = "atmel,at91sam9x5-gpio", .data = &at91sam9x5_ops, },
        { .compatible = "atmel,at91rm9200-gpio", .data = &at91rm9200_ops },
        { /* sentinel */ }
index 26461e30f0aebf6bd3fff75f9c29dd61143985ef..2631df0504bd62a9edd519ad6824f8c4f7e6a879 100644 (file)
@@ -987,7 +987,7 @@ static struct palmas_pinctrl_data tps80036_pinctrl_data = {
        .num_pin_groups = ARRAY_SIZE(tps80036_pingroups),
 };
 
-static struct of_device_id palmas_pinctrl_of_match[] = {
+static const struct of_device_id palmas_pinctrl_of_match[] = {
        { .compatible = "ti,palmas-pinctrl", .data = &tps65913_pinctrl_data},
        { .compatible = "ti,tps65913-pinctrl", .data = &tps65913_pinctrl_data},
        { .compatible = "ti,tps80036-pinctrl", .data = &tps80036_pinctrl_data},
index 69e84427f9134ad3c0d5bdbe1299dd1379b44e7e..13b45f29772788514e62dca7b74cad5d0063e856 100644 (file)
@@ -1501,7 +1501,7 @@ static void pcs_free_resources(struct pcs_device *pcs)
                }                                                       \
        } while (0);
 
-static struct of_device_id pcs_of_match[];
+static const struct of_device_id pcs_of_match[];
 
 static int pcs_add_gpio_func(struct device_node *node, struct pcs_device *pcs)
 {
@@ -2000,7 +2000,7 @@ static const struct pcs_soc_data pinconf_single = {
        .flags = PCS_FEAT_PINCONF,
 };
 
-static struct of_device_id pcs_of_match[] = {
+static const struct of_device_id pcs_of_match[] = {
        { .compatible = "ti,omap3-padconf", .data = &pinctrl_single_omap_wkup },
        { .compatible = "ti,omap4-padconf", .data = &pinctrl_single_omap_wkup },
        { .compatible = "ti,omap5-padconf", .data = &pinctrl_single_omap_wkup },
index b80ccc74a213f4b4889bb6d5963bca329cb6162d..65bf73b70e3406c72db02f796840fa6296bbdcb9 100644 (file)
@@ -1590,7 +1590,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
        return 0;
 }
 
-static struct of_device_id st_pctl_of_match[] = {
+static const struct of_device_id st_pctl_of_match[] = {
        { .compatible = "st,stih415-sbc-pinctrl", .data = &stih415_sbc_data },
        { .compatible = "st,stih415-rear-pinctrl", .data = &stih415_rear_data },
        { .compatible = "st,stih415-left-pinctrl", .data = &stih415_left_data },
index fab6aafa6a9f4466984ba83a3cf0719a1df7b2dc..8a8911bb883a2007d83f6fc53bacfc440ba5c103 100644 (file)
@@ -969,7 +969,7 @@ static int tz1090_pdc_pinctrl_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct of_device_id tz1090_pdc_pinctrl_of_match[] = {
+static const struct of_device_id tz1090_pdc_pinctrl_of_match[] = {
        { .compatible = "img,tz1090-pdc-pinctrl", },
        { },
 };
index 8bd73075f9dd3e658c7e41210eb90efec676589e..fc5594a530c2f9770f0e8db92c7874b91a643c37 100644 (file)
@@ -1984,7 +1984,7 @@ static int tz1090_pinctrl_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct of_device_id tz1090_pinctrl_of_match[] = {
+static const struct of_device_id tz1090_pinctrl_of_match[] = {
        { .compatible = "img,tz1090-pinctrl", },
        { },
 };
index 24c5d88f943f7809910507727ff50d4a43532530..37aa2a8bd4f6ef5888fb8c707a7ad172f82cc417 100644 (file)
@@ -1019,7 +1019,7 @@ static int sun4i_a10_pinctrl_probe(struct platform_device *pdev)
                                  &sun4i_a10_pinctrl_data);
 }
 
-static struct of_device_id sun4i_a10_pinctrl_match[] = {
+static const struct of_device_id sun4i_a10_pinctrl_match[] = {
        { .compatible = "allwinner,sun4i-a10-pinctrl", },
        {}
 };
index 45a351affa59d02f39acb14a7c21d0a828354026..63676617bc5997218729a56c15c8597f8c2499b9 100644 (file)
@@ -670,7 +670,7 @@ static int sun5i_a10s_pinctrl_probe(struct platform_device *pdev)
                                  &sun5i_a10s_pinctrl_data);
 }
 
-static struct of_device_id sun5i_a10s_pinctrl_match[] = {
+static const struct of_device_id sun5i_a10s_pinctrl_match[] = {
        { .compatible = "allwinner,sun5i-a10s-pinctrl", },
        {}
 };
index 4bd23471412ccaa54f707f072d5d354f4873e7a2..2bb07b38834f743b7705af3d816803567064311f 100644 (file)
@@ -388,7 +388,7 @@ static int sun5i_a13_pinctrl_probe(struct platform_device *pdev)
                                  &sun5i_a13_pinctrl_data);
 }
 
-static struct of_device_id sun5i_a13_pinctrl_match[] = {
+static const struct of_device_id sun5i_a13_pinctrl_match[] = {
        { .compatible = "allwinner,sun5i-a13-pinctrl", },
        {}
 };
index 02174fa57997e4c07b6fc7822e456db95b9fa772..9596b0a3df6be7f1b4cdfb238ae4d29f94538d0e 100644 (file)
@@ -120,7 +120,7 @@ static int sun6i_a31_r_pinctrl_probe(struct platform_device *pdev)
        return ret;
 }
 
-static struct of_device_id sun6i_a31_r_pinctrl_match[] = {
+static const struct of_device_id sun6i_a31_r_pinctrl_match[] = {
        { .compatible = "allwinner,sun6i-a31-r-pinctrl", },
        {}
 };
index 18038f0d6b5222cf77a1386cbe874d23cd0a94b3..022863ab0c5824f3fd832b0c82906d0178b8b9a7 100644 (file)
@@ -922,7 +922,7 @@ static int sun6i_a31_pinctrl_probe(struct platform_device *pdev)
                                  &sun6i_a31_pinctrl_data);
 }
 
-static struct of_device_id sun6i_a31_pinctrl_match[] = {
+static const struct of_device_id sun6i_a31_pinctrl_match[] = {
        { .compatible = "allwinner,sun6i-a31-pinctrl", },
        {}
 };
index 9b5a91f610c7e4d0c8e131b09bfb307e609626f4..d3725dcd6979b874431e7f7f9c3ab61eb484ec63 100644 (file)
@@ -794,7 +794,7 @@ static int sun6i_a31s_pinctrl_probe(struct platform_device *pdev)
                                  &sun6i_a31s_pinctrl_data);
 }
 
-static struct of_device_id sun6i_a31s_pinctrl_match[] = {
+static const struct of_device_id sun6i_a31s_pinctrl_match[] = {
        { .compatible = "allwinner,sun6i-a31s-pinctrl", },
        {}
 };
index 6af6cc8547b0f39a00f998d5529f834902f1f8d0..cf1ce0c02600e6e051f9726f693e3a848eaa379d 100644 (file)
@@ -1045,7 +1045,7 @@ static int sun7i_a20_pinctrl_probe(struct platform_device *pdev)
                                  &sun7i_a20_pinctrl_data);
 }
 
-static struct of_device_id sun7i_a20_pinctrl_match[] = {
+static const struct of_device_id sun7i_a20_pinctrl_match[] = {
        { .compatible = "allwinner,sun7i-a20-pinctrl", },
        {}
 };
index 327e03ff7c4dc3eb249918f3296b5880892f57c5..05628763587335b7e8c1a1689bd937fd723d8cbe 100644 (file)
@@ -119,7 +119,7 @@ static int sun8i_a23_r_pinctrl_probe(struct platform_device *pdev)
        return ret;
 }
 
-static struct of_device_id sun8i_a23_r_pinctrl_match[] = {
+static const struct of_device_id sun8i_a23_r_pinctrl_match[] = {
        { .compatible = "allwinner,sun8i-a23-r-pinctrl", },
        {}
 };
index 62695c9a92c21bd0696ef78e91887fbfef521ad7..55083d278bb1eb36e38772fc36206f41a1460138 100644 (file)
@@ -571,7 +571,7 @@ static int sun8i_a23_pinctrl_probe(struct platform_device *pdev)
                                  &sun8i_a23_pinctrl_data);
 }
 
-static struct of_device_id sun8i_a23_pinctrl_match[] = {
+static const struct of_device_id sun8i_a23_pinctrl_match[] = {
        { .compatible = "allwinner,sun8i-a23-pinctrl", },
        {}
 };
index adb29422efc97a409a9da5e58c843299d8bc8215..1b580ba764531a6d04d2293486f9e1b78a466f45 100644 (file)
@@ -729,7 +729,7 @@ static int sun9i_a80_pinctrl_probe(struct platform_device *pdev)
                                  &sun9i_a80_pinctrl_data);
 }
 
-static struct of_device_id sun9i_a80_pinctrl_match[] = {
+static const struct of_device_id sun9i_a80_pinctrl_match[] = {
        { .compatible = "allwinner,sun9i-a80-pinctrl", },
        {}
 };
index cf8bbc946ff70f7aa73b14eba19a05a29e67dba2..ca946b3dbdb4f717b2543ee9fade272c4c0926ea 100644 (file)
@@ -478,7 +478,7 @@ static int vt8500_pinctrl_remove(struct platform_device *pdev)
        return wmt_pinctrl_remove(pdev);
 }
 
-static struct of_device_id wmt_pinctrl_of_match[] = {
+static const struct of_device_id wmt_pinctrl_of_match[] = {
        { .compatible = "via,vt8500-pinctrl" },
        { /* sentinel */ },
 };
index 3f9c32dcb3d04cd24048e623ade3f3511108484a..626fc7ec017462948e784715851f84dd58281b35 100644 (file)
@@ -509,7 +509,7 @@ static int wm8505_pinctrl_remove(struct platform_device *pdev)
        return wmt_pinctrl_remove(pdev);
 }
 
-static struct of_device_id wmt_pinctrl_of_match[] = {
+static const struct of_device_id wmt_pinctrl_of_match[] = {
        { .compatible = "wm,wm8505-pinctrl" },
        { /* sentinel */ },
 };
index 4e80f98c2ba7c24656904b1364cb95b4b64775bc..8953aba8bfc2261e5c6cef9392d69cb4c5b1209f 100644 (file)
@@ -347,7 +347,7 @@ static int wm8650_pinctrl_remove(struct platform_device *pdev)
        return wmt_pinctrl_remove(pdev);
 }
 
-static struct of_device_id wmt_pinctrl_of_match[] = {
+static const struct of_device_id wmt_pinctrl_of_match[] = {
        { .compatible = "wm,wm8650-pinctrl" },
        { /* sentinel */ },
 };
index 47b52a7cacac049d5b576ecd98965e9c2cd5d8b9..c79053d430db5ad6894ebf60d10e30fdbfe05b06 100644 (file)
@@ -386,7 +386,7 @@ static int wm8750_pinctrl_remove(struct platform_device *pdev)
        return wmt_pinctrl_remove(pdev);
 }
 
-static struct of_device_id wmt_pinctrl_of_match[] = {
+static const struct of_device_id wmt_pinctrl_of_match[] = {
        { .compatible = "wm,wm8750-pinctrl" },
        { /* sentinel */ },
 };
index 8bbb38c931f659f24e3cbd024557c9b3d1f52592..f232b163c735cfb4e9a4c3fa11033c9d5142739f 100644 (file)
@@ -365,7 +365,7 @@ static int wm8850_pinctrl_remove(struct platform_device *pdev)
        return wmt_pinctrl_remove(pdev);
 }
 
-static struct of_device_id wmt_pinctrl_of_match[] = {
+static const struct of_device_id wmt_pinctrl_of_match[] = {
        { .compatible = "wm,wm8850-pinctrl" },
        { /* sentinel */ },
 };