未验证 提交 401c0d77 编写于 作者: B Boris Brezillon 提交者: Mark Brown

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: 5d27a9c8 ("spi: spi-mem: Extend the SPI mem interface to set a custom memory name")
Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 b02b17f5
......@@ -134,7 +134,7 @@ struct spi_mem_op {
struct spi_mem {
struct spi_device *spi;
void *drvpriv;
char *name;
const char *name;
};
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册