Commit e3779f6a authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Tejun Heo

ata: constify of_device_id structures

Declare of_device_id structures as const as they are either passed to
the macro MODULE_DEVICE_TABLE or stored in the of_match_table field of a
device_driver structure. This field is of type const, so of_device_id
structures having this property can be made const too.

Cross compiled the files drivers/ata/pata_macio.c and
drivers/ata/pata_mpc52xx.c for powerpc architecture.
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent c1ae3cfa
...@@ -1328,7 +1328,7 @@ static int pata_macio_pci_resume(struct pci_dev *pdev) ...@@ -1328,7 +1328,7 @@ static int pata_macio_pci_resume(struct pci_dev *pdev)
} }
#endif /* CONFIG_PM_SLEEP */ #endif /* CONFIG_PM_SLEEP */
static struct of_device_id pata_macio_match[] = static const struct of_device_id pata_macio_match[] =
{ {
{ {
.name = "IDE", .name = "IDE",
......
...@@ -847,7 +847,7 @@ mpc52xx_ata_resume(struct platform_device *op) ...@@ -847,7 +847,7 @@ mpc52xx_ata_resume(struct platform_device *op)
} }
#endif #endif
static struct of_device_id mpc52xx_ata_of_match[] = { static const struct of_device_id mpc52xx_ata_of_match[] = {
{ .compatible = "fsl,mpc5200-ata", }, { .compatible = "fsl,mpc5200-ata", },
{ .compatible = "mpc5200-ata", }, { .compatible = "mpc5200-ata", },
{}, {},
......
...@@ -67,7 +67,7 @@ static int pata_of_platform_probe(struct platform_device *ofdev) ...@@ -67,7 +67,7 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
reg_shift, pio_mask, &pata_platform_sht); reg_shift, pio_mask, &pata_platform_sht);
} }
static struct of_device_id pata_of_platform_match[] = { static const struct of_device_id pata_of_platform_match[] = {
{ .compatible = "ata-generic", }, { .compatible = "ata-generic", },
{ }, { },
}; };
......
...@@ -1612,7 +1612,7 @@ static int sata_fsl_resume(struct platform_device *op) ...@@ -1612,7 +1612,7 @@ static int sata_fsl_resume(struct platform_device *op)
} }
#endif #endif
static struct of_device_id fsl_sata_match[] = { static const struct of_device_id fsl_sata_match[] = {
{ {
.compatible = "fsl,pq-sata", .compatible = "fsl,pq-sata",
}, },
......
...@@ -4286,7 +4286,7 @@ static int mv_platform_resume(struct platform_device *pdev) ...@@ -4286,7 +4286,7 @@ static int mv_platform_resume(struct platform_device *pdev)
#endif #endif
#ifdef CONFIG_OF #ifdef CONFIG_OF
static struct of_device_id mv_sata_dt_ids[] = { static const struct of_device_id mv_sata_dt_ids[] = {
{ .compatible = "marvell,armada-370-sata", }, { .compatible = "marvell,armada-370-sata", },
{ .compatible = "marvell,orion-sata", }, { .compatible = "marvell,orion-sata", },
{}, {},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment