]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: spi-nor: cqspi: make of_device_ids const
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 16 Jun 2017 09:35:17 +0000 (15:05 +0530)
committerCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Tue, 20 Jun 2017 21:54:18 +0000 (23:54 +0200)
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@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
drivers/mtd/spi-nor/cadence-quadspi.c

index 40096d73536cf8783252045900b1237e4a1e17f7..d315c326e72f06d7dd4bd57976f9e389716b8fec 100644 (file)
@@ -1283,7 +1283,7 @@ static const struct dev_pm_ops cqspi__dev_pm_ops = {
 #define CQSPI_DEV_PM_OPS       NULL
 #endif
 
 #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 */ }
 };
        {.compatible = "cdns,qspi-nor",},
        { /* end of table */ }
 };