Skip to content

Commit baa9946

Browse files
Fabian Fredericklinusw
authored andcommitted
pinctrl: constify of_device_id array
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>
1 parent 4024efb commit baa9946

32 files changed

+38
-34
lines changed

drivers/pinctrl/bcm/pinctrl-bcm2835.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ static int bcm2835_pinctrl_remove(struct platform_device *pdev)
10511051
return 0;
10521052
}
10531053

1054-
static struct of_device_id bcm2835_pinctrl_match[] = {
1054+
static const struct of_device_id bcm2835_pinctrl_match[] = {
10551055
{ .compatible = "brcm,bcm2835-gpio" },
10561056
{}
10571057
};

drivers/pinctrl/mediatek/pinctrl-mt8135.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,9 @@ static int mt8135_pinctrl_probe(struct platform_device *pdev)
348348
}
349349

350350
static const struct of_device_id mt8135_pctrl_match[] = {
351-
{ .compatible = "mediatek,mt8135-pinctrl", },
351+
{
352+
.compatible = "mediatek,mt8135-pinctrl",
353+
},
352354
{ }
353355
};
354356
MODULE_DEVICE_TABLE(of, mt8135_pctrl_match);

drivers/pinctrl/mediatek/pinctrl-mt8173.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,9 @@ static int mt8173_pinctrl_probe(struct platform_device *pdev)
428428
}
429429

430430
static const struct of_device_id mt8173_pctrl_match[] = {
431-
{ .compatible = "mediatek,mt8173-pinctrl", },
431+
{
432+
.compatible = "mediatek,mt8173-pinctrl",
433+
},
432434
{ }
433435
};
434436
MODULE_DEVICE_TABLE(of, mt8173_pctrl_match);

drivers/pinctrl/mvebu/pinctrl-armada-370.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static struct mvebu_mpp_mode mv88f6710_mpp_modes[] = {
379379

380380
static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info;
381381

382-
static struct of_device_id armada_370_pinctrl_of_match[] = {
382+
static const struct of_device_id armada_370_pinctrl_of_match[] = {
383383
{ .compatible = "marvell,mv88f6710-pinctrl" },
384384
{ },
385385
};

drivers/pinctrl/mvebu/pinctrl-armada-375.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static struct mvebu_mpp_mode mv88f6720_mpp_modes[] = {
399399

400400
static struct mvebu_pinctrl_soc_info armada_375_pinctrl_info;
401401

402-
static struct of_device_id armada_375_pinctrl_of_match[] = {
402+
static const struct of_device_id armada_375_pinctrl_of_match[] = {
403403
{ .compatible = "marvell,mv88f6720-pinctrl" },
404404
{ },
405405
};

drivers/pinctrl/mvebu/pinctrl-armada-38x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ static struct mvebu_mpp_mode armada_38x_mpp_modes[] = {
389389

390390
static struct mvebu_pinctrl_soc_info armada_38x_pinctrl_info;
391391

392-
static struct of_device_id armada_38x_pinctrl_of_match[] = {
392+
static const struct of_device_id armada_38x_pinctrl_of_match[] = {
393393
{
394394
.compatible = "marvell,mv88f6810-pinctrl",
395395
.data = (void *) V_88F6810,

drivers/pinctrl/mvebu/pinctrl-armada-39x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static struct mvebu_mpp_mode armada_39x_mpp_modes[] = {
362362

363363
static struct mvebu_pinctrl_soc_info armada_39x_pinctrl_info;
364364

365-
static struct of_device_id armada_39x_pinctrl_of_match[] = {
365+
static const struct of_device_id armada_39x_pinctrl_of_match[] = {
366366
{
367367
.compatible = "marvell,mv88f6920-pinctrl",
368368
.data = (void *) V_88F6920,

drivers/pinctrl/mvebu/pinctrl-armada-xp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static struct mvebu_mpp_mode armada_xp_mpp_modes[] = {
362362

363363
static struct mvebu_pinctrl_soc_info armada_xp_pinctrl_info;
364364

365-
static struct of_device_id armada_xp_pinctrl_of_match[] = {
365+
static const struct of_device_id armada_xp_pinctrl_of_match[] = {
366366
{
367367
.compatible = "marvell,mv78230-pinctrl",
368368
.data = (void *) V_MV78230,

drivers/pinctrl/mvebu/pinctrl-kirkwood.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ static struct mvebu_pinctrl_soc_info mv98dx4122_info = {
456456
.ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges),
457457
};
458458

459-
static struct of_device_id kirkwood_pinctrl_of_match[] = {
459+
static const struct of_device_id kirkwood_pinctrl_of_match[] = {
460460
{ .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info },
461461
{ .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info },
462462
{ .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info },

drivers/pinctrl/mvebu/pinctrl-orion.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static struct mvebu_pinctrl_soc_info mv88f5281_info = {
211211
* There are multiple variants of the Orion SoCs, but in terms of pin
212212
* muxing, they are identical.
213213
*/
214-
static struct of_device_id orion_pinctrl_of_match[] = {
214+
static const struct of_device_id orion_pinctrl_of_match[] = {
215215
{ .compatible = "marvell,88f5181l-pinctrl", .data = &mv88f5181l_info },
216216
{ .compatible = "marvell,88f5182-pinctrl", .data = &mv88f5182_info },
217217
{ .compatible = "marvell,88f5281-pinctrl", .data = &mv88f5281_info },

0 commit comments

Comments
 (0)