Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: mchp48l640: Use str_enable_disable() in mchp48l640_write_prepare()

Remove hard-coded strings by using the str_enable_disable() helper
function.

Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Zhang Heng and committed by
Miquel Raynal
3081f260 9fe1617d

+5 -4
+5 -4
drivers/mtd/devices/mchp48l640.c
··· 23 23 #include <linux/spi/flash.h> 24 24 #include <linux/spi/spi.h> 25 25 #include <linux/of.h> 26 + #include <linux/string_choices.h> 26 27 27 28 struct mchp48_caps { 28 29 unsigned int size; ··· 129 128 mutex_unlock(&flash->lock); 130 129 131 130 if (ret) 132 - dev_err(&flash->spi->dev, "write %sable failed ret: %d", 133 - (enable ? "en" : "dis"), ret); 131 + dev_err(&flash->spi->dev, "write %s failed ret: %d", 132 + str_enable_disable(enable), ret); 134 133 135 - dev_dbg(&flash->spi->dev, "write %sable success ret: %d", 136 - (enable ? "en" : "dis"), ret); 134 + dev_dbg(&flash->spi->dev, "write %s success ret: %d", 135 + str_enable_disable(enable), ret); 137 136 if (enable) 138 137 return mchp48l640_waitforbit(flash, MCHP48L640_STATUS_WEL, true); 139 138