Skip to content

Commit

Permalink
char: constify of_device_id array
Browse files Browse the repository at this point in the history
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Fabian Frederick authored and gregkh committed Mar 16, 2015
1 parent 6893d9b commit da2ff52
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/char/hw_random/pasemi-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int rng_remove(struct platform_device *dev)
return 0;
}

static struct of_device_id rng_match[] = {
static const struct of_device_id rng_match[] = {
{ .compatible = "1682m-rng", },
{ .compatible = "pasemi,pwrficient-rng", },
{ },
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/powernv-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int powernv_rng_probe(struct platform_device *pdev)
return 0;
}

static struct of_device_id powernv_rng_match[] = {
static const struct of_device_id powernv_rng_match[] = {
{ .compatible = "ibm,power-rng",},
{},
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/ppc4xx-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static int ppc4xx_rng_remove(struct platform_device *dev)
return 0;
}

static struct of_device_id ppc4xx_rng_match[] = {
static const struct of_device_id ppc4xx_rng_match[] = {
{ .compatible = "ppc4xx-rng", },
{ .compatible = "amcc,ppc460ex-rng", },
{ .compatible = "amcc,ppc440epx-rng", },
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,7 @@ static struct pci_driver ipmi_pci_driver = {
};
#endif /* CONFIG_PCI */

static struct of_device_id ipmi_match[];
static const struct of_device_id ipmi_match[];
static int ipmi_probe(struct platform_device *dev)
{
#ifdef CONFIG_OF
Expand Down Expand Up @@ -2761,7 +2761,7 @@ static int ipmi_remove(struct platform_device *dev)
return 0;
}

static struct of_device_id ipmi_match[] =
static const struct of_device_id ipmi_match[] =
{
{ .type = "ipmi", .compatible = "ipmi-kcs",
.data = (void *)(unsigned long) SI_KCS },
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/xillybus/xillybus_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MODULE_LICENSE("GPL v2");
static const char xillyname[] = "xillybus_of";

/* Match table for of_platform binding */
static struct of_device_id xillybus_of_match[] = {
static const struct of_device_id xillybus_of_match[] = {
{ .compatible = "xillybus,xillybus-1.00.a", },
{ .compatible = "xlnx,xillybus-1.00.a", }, /* Deprecated */
{}
Expand Down

0 comments on commit da2ff52

Please sign in to comment.