Skip to content

Commit 401c0d7

Browse files
Boris Brezillonbroonie
authored andcommitted
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: 5d27a9c ("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]>
1 parent b02b17f commit 401c0d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/spi/spi-mem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct spi_mem_op {
134134
struct spi_mem {
135135
struct spi_device *spi;
136136
void *drvpriv;
137-
char *name;
137+
const char *name;
138138
};
139139

140140
/**

0 commit comments

Comments
 (0)