diff options
| author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-08-03 05:50:39 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2018-08-03 05:51:25 -0400 |
| commit | 401c0d7712eb3189023efc9c0708a2ac984ed62e (patch) | |
| tree | 9d8ef290bde4a8ebb83ec84a13006637f23b37ce | |
| parent | b02b17f55b2e789b9747cf4dd2eaaa110439a4cc (diff) | |
spi: spi-mem: Constify spi_mem->name
There is no reason to make spi_mem->name modifiable. Moreover,
spi_mem_ops->get_name() returns a const char *, which generates a gcc
warning when assigning the value returned by spi_mem_ops->get_name()
to spi_mem->name.
Fixes: 5d27a9c8ea9e ("spi: spi-mem: Extend the SPI mem interface to set a custom memory name")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | include/linux/spi/spi-mem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h index 0d64ccc4e584..62722fb7472d 100644 --- a/include/linux/spi/spi-mem.h +++ b/include/linux/spi/spi-mem.h | |||
| @@ -134,7 +134,7 @@ struct spi_mem_op { | |||
| 134 | struct spi_mem { | 134 | struct spi_mem { |
| 135 | struct spi_device *spi; | 135 | struct spi_device *spi; |
| 136 | void *drvpriv; | 136 | void *drvpriv; |
| 137 | char *name; | 137 | const char *name; |
| 138 | }; | 138 | }; |
| 139 | 139 | ||
| 140 | /** | 140 | /** |
