]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-mem: Constify spi_mem->name
authorBoris Brezillon <boris.brezillon@bootlin.com>
Fri, 3 Aug 2018 09:50:39 +0000 (11:50 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 3 Aug 2018 09:51:25 +0000 (10:51 +0100)
commit2734caebe42da397669d6ca611d803b0d19d70f5
tree9d8ef290bde4a8ebb83ec84a13006637f23b37ce
parentb2c8ab0ed5201d0f553761c3692bfcaa406e2fd1
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: da931e8fa02e ("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>
include/linux/spi/spi-mem.h