diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-11 13:40:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-16 08:07:58 +0200 |
commit | 760f14774fcd17c863ae0746fad79a230b6f3b2e (patch) | |
tree | 2ab36f4ad440a463c9e8aa8f04616b93ce13707e | |
parent | aa03dc194997eabf157118b76b0ab5ef88a9faff (diff) | |
download | barebox-760f14774fcd.tar.gz barebox-760f14774fcd.tar.xz |
mtd: nand: stm32: fix wrong regmap_bulk_read() usage
Compilation of the STM32 NAND driver fails with:
error: call to '__regmap_bulk_api_changed' declared with attribute error: Last argument is now number of registers, not bytes. Fix it and include <linux/regmap.h instead
Do exactly this to make the driver compile again
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/nand/stm32_fmc2_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/stm32_fmc2_nand.c b/drivers/mtd/nand/stm32_fmc2_nand.c index 958a619be5..47b012cc9e 100644 --- a/drivers/mtd/nand/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/stm32_fmc2_nand.c @@ -7,7 +7,7 @@ #include <common.h> #include <init.h> #include <of_address.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/bitfield.h> #include <linux/clk.h> #include <linux/gpio/consumer.h> @@ -551,7 +551,7 @@ static int stm32_fmc2_nfc_bch_correct(struct nand_chip *chip, u8 *dat, return -ETIMEDOUT; } - regmap_bulk_read(nfc->regmap, FMC2_BCHDSR0, ecc_sta, 5); + regmap_bulk_read(nfc->regmap, FMC2_BCHDSR0, ecc_sta, ARRAY_SIZE(ecc_sta)); stm32_fmc2_nfc_set_ecc(nfc, false); |