ata: constify of_device_id structures
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 1 Mar 2017 19:33:28 +0000 (01:03 +0530)
committerTejun Heo <tj@kernel.org>
Mon, 6 Mar 2017 20:18:01 +0000 (15:18 -0500)
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: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/pata_macio.c
drivers/ata/pata_mpc52xx.c
drivers/ata/pata_of_platform.c
drivers/ata/sata_fsl.c
drivers/ata/sata_mv.c

index e347e7acd8edb440d284d6309187bbb80cd90cd2..0adcb40d2794ec5efe4a21407aade6728b8b2bd0 100644 (file)
@@ -1328,7 +1328,7 @@ static int pata_macio_pci_resume(struct pci_dev *pdev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-static struct of_device_id pata_macio_match[] =
+static const struct of_device_id pata_macio_match[] =
 {
        {
        .name           = "IDE",
index 252ba27fa63baba8d10423d0d288dadeee1a7926..9730125530f669ea3dc567235a4b3c7d598d17d0 100644 (file)
@@ -847,7 +847,7 @@ mpc52xx_ata_resume(struct platform_device *op)
 }
 #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 = "mpc5200-ata", },
        {},
index 201a32d0627fb5fd44d0b1abc9e87f605fd587b2..01161c1aef4d6d463bd2f6c9648328100a10f8a0 100644 (file)
@@ -67,7 +67,7 @@ static int pata_of_platform_probe(struct platform_device *ofdev)
                                     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", },
        { },
 };
index a723ae92978310f64e65eeef44509337a027c8a5..01734d54c69cdcde06908e89f5e16576348f863d 100644 (file)
@@ -1612,7 +1612,7 @@ static int sata_fsl_resume(struct platform_device *op)
 }
 #endif
 
-static struct of_device_id fsl_sata_match[] = {
+static const struct of_device_id fsl_sata_match[] = {
        {
                .compatible = "fsl,pq-sata",
        },
index 00ce26d0c04703a102802d951775e62268239d7f..b66bcda88320fefa399ac9653eca64d3045a6a96 100644 (file)
@@ -4286,7 +4286,7 @@ static int mv_platform_resume(struct platform_device *pdev)
 #endif
 
 #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,orion-sata", },
        {},