Saves a few bytes of binary space. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/mtd/nand/nand_omap_gpmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c index d448251..8168193 100644 --- a/drivers/mtd/nand/nand_omap_gpmc.c +++ b/drivers/mtd/nand/nand_omap_gpmc.c @@ -1049,7 +1049,8 @@ static int gpmc_nand_probe(struct device_d *pdev) } nand->read_buf = omap_read_buf_pref; - nand->write_buf = omap_write_buf_pref; + if (IS_ENABLED(CONFIG_MTD_WRITE)) + nand->write_buf = omap_write_buf_pref; nand->options |= NAND_SKIP_BBTSCAN; -- 1.8.3.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox