* [PATCH] mtd: spi-nor: cqspi: make of_device_ids const
@ 2017-06-16 9:35 Arvind Yadav
2017-06-16 10:27 ` Marek Vasut
0 siblings, 1 reply; 3+ messages in thread
From: Arvind Yadav @ 2017-06-16 9:35 UTC (permalink / raw)
To: cyrille.pitchen, marek.vasut, dwmw2, computersforpeace,
boris.brezillon, richard
Cc: linux-mtd, linux-kernel
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>
---
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 9f8102d..1a25637 100644
--- a/drivers/mtd/spi-nor/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/cadence-quadspi.c
@@ -1277,7 +1277,7 @@ static int cqspi_resume(struct device *dev)
#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 */ }
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: spi-nor: cqspi: make of_device_ids const
2017-06-16 9:35 [PATCH] mtd: spi-nor: cqspi: make of_device_ids const Arvind Yadav
@ 2017-06-16 10:27 ` Marek Vasut
2017-06-20 21:56 ` Cyrille Pitchen
0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2017-06-16 10:27 UTC (permalink / raw)
To: Arvind Yadav, cyrille.pitchen, dwmw2, computersforpeace,
boris.brezillon, richard
Cc: linux-mtd, linux-kernel
On 06/16/2017 11:35 AM, Arvind Yadav wrote:
> 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>
Works for me
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> 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 9f8102d..1a25637 100644
> --- a/drivers/mtd/spi-nor/cadence-quadspi.c
> +++ b/drivers/mtd/spi-nor/cadence-quadspi.c
> @@ -1277,7 +1277,7 @@ static int cqspi_resume(struct device *dev)
> #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 */ }
> };
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: spi-nor: cqspi: make of_device_ids const
2017-06-16 10:27 ` Marek Vasut
@ 2017-06-20 21:56 ` Cyrille Pitchen
0 siblings, 0 replies; 3+ messages in thread
From: Cyrille Pitchen @ 2017-06-20 21:56 UTC (permalink / raw)
To: Marek Vasut, Arvind Yadav, dwmw2, computersforpeace,
boris.brezillon, richard
Cc: linux-mtd, linux-kernel
Le 16/06/2017 à 12:27, Marek Vasut a écrit :
> On 06/16/2017 11:35 AM, Arvind Yadav wrote:
>> 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>
>
> Works for me
> Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
>
Applied to the spi-nor/next branch of l2-mtd
Thanks!
>> ---
>> 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 9f8102d..1a25637 100644
>> --- a/drivers/mtd/spi-nor/cadence-quadspi.c
>> +++ b/drivers/mtd/spi-nor/cadence-quadspi.c
>> @@ -1277,7 +1277,7 @@ static int cqspi_resume(struct device *dev)
>> #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 */ }
>> };
>>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-21 3:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16 9:35 [PATCH] mtd: spi-nor: cqspi: make of_device_ids const Arvind Yadav
2017-06-16 10:27 ` Marek Vasut
2017-06-20 21:56 ` Cyrille Pitchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).