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 <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
struct spi_mem {
struct spi_device *spi;
void *drvpriv;
- char *name;
+ const char *name;
};
/**