diff options
author | 2025-03-13 17:57:55 +0800 | |
---|---|---|
committer | 2025-03-18 17:18:51 +0100 | |
commit | 9fe1617df3c8f522755996383b9a3abf8ce81662 (patch) | |
tree | aa3d1d26aaf43cdca2de3280661f0bb0ddf0637a | |
parent | mtd: mtdpart: Do not supply NULL to printf() (diff) | |
download | wireguard-linux-9fe1617df3c8f522755996383b9a3abf8ce81662.tar.xz wireguard-linux-9fe1617df3c8f522755996383b9a3abf8ce81662.zip |
mtd: rawnand: gpmi: Use str_enabled_disabled() in gpmi_nand_attach_chip()
Remove hard-coded strings by using the str_enabled_disabled() helper
function.
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Reviewed-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-rw-r--r-- | drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c index d76802944453..f4e68008ea03 100644 --- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c @@ -17,6 +17,7 @@ #include <linux/pm_runtime.h> #include <linux/pinctrl/consumer.h> #include <linux/dma/mxs-dma.h> +#include <linux/string_choices.h> #include "gpmi-nand.h" #include "gpmi-regs.h" #include "bch-regs.h" @@ -2319,8 +2320,8 @@ static int gpmi_nand_attach_chip(struct nand_chip *chip) "fsl,no-blockmark-swap")) this->swap_block_mark = false; } - dev_dbg(this->dev, "Blockmark swapping %sabled\n", - this->swap_block_mark ? "en" : "dis"); + dev_dbg(this->dev, "Blockmark swapping %s\n", + str_enabled_disabled(this->swap_block_mark)); ret = gpmi_init_last(this); if (ret) |