Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1667584 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-06-16 11:40 +0200 |
| Last post | 2017-06-16 12:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mtd: spi-nor: cqspi: make of_device_ids const Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-06-16 11:40 +0200
Re: [PATCH] mtd: spi-nor: cqspi: make of_device_ids const Marek Vasut <marek.vasut@gmail.com> - 2017-06-16 12:30 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-06-16 11:40 +0200 |
| Subject | [PATCH] mtd: spi-nor: cqspi: make of_device_ids const |
| Message-ID | <tSVTr-6D9-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Marek Vasut <marek.vasut@gmail.com> |
|---|---|
| Date | 2017-06-16 12:30 +0200 |
| Message-ID | <tSWFQ-7co-11@gated-at.bofh.it> |
| In reply to | #1667584 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web