mtd: spi-nor: cqspi: make of_device_ids const

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Jul 13 10:59:08 PDT 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f993c123b461ff47c10edfee65465fe651d0521f
Commit:     f993c123b461ff47c10edfee65465fe651d0521f
Parent:     0cbef932bd82857823c0e52b08218b0c9920a475
Author:     Arvind Yadav <arvind.yadav.cs at gmail.com>
AuthorDate: Fri Jun 16 15:05:17 2017 +0530
Committer:  Cyrille Pitchen <cyrille.pitchen at wedev4u.fr>
CommitDate: Tue Jun 20 23:54:18 2017 +0200

    mtd: spi-nor: cqspi: make of_device_ids const
    
    of_device_ids are not supposed to change at runtime. All functions
    working with of_device_ids provided by <linux/of.h> work with const
    of_device_ids. So mark the non-const structs as const.
    
    Signed-off-by: Arvind Yadav <arvind.yadav.cs at gmail.com>
    Reviewed-by: Marek Vasut <marek.vasut at gmail.com>
    Signed-off-by: Cyrille Pitchen <cyrille.pitchen at wedev4u.fr>
---
 drivers/mtd/spi-nor/cadence-quadspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c
index 40096d7..d315c32 100644
--- a/drivers/mtd/spi-nor/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/cadence-quadspi.c
@@ -1283,7 +1283,7 @@ static const struct dev_pm_ops cqspi__dev_pm_ops = {
 #define CQSPI_DEV_PM_OPS	NULL
 #endif
 
-static struct of_device_id const cqspi_dt_ids[] = {
+static const struct of_device_id const cqspi_dt_ids[] = {
 	{.compatible = "cdns,qspi-nor",},
 	{ /* end of table */ }
 };



More information about the linux-mtd-cvs mailing list