]> git.baikalelectronics.ru Git - uboot.git/commitdiff
mtd: nand: Fix MediaTek MT7621 SoC build
authorMichael Trimarchi <michael@amarulasolutions.com>
Fri, 22 Jul 2022 08:28:36 +0000 (10:28 +0200)
committerMichael Trimarchi <michael@amarulasolutions.com>
Fri, 22 Jul 2022 11:29:06 +0000 (13:29 +0200)
nand_get_flash_type was reworked in commit c045ea686841b2. This change
break the Mediatek MT721. Fix it adjust the function call parameters

+include/linux/mtd/rawnand.h:32:62: note: expected 'struct nand_chip *' but argument is of type 'struct mtd_info *'
+   32 | struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip,
+      |                                            ~~~~~~~~~~~~~~~~~~^~~~
+drivers/mtd/nand/raw/mt7621_nand.c:1189:48: error: passing argument 2 of 'nand_get_flash_type' from incompatible pointer type [-Werror=incompatible-pointer-types]
+      |                                                ^~~~
+      |                                                |
+      |                                                struct nand_chip *
+include/linux/mtd/rawnand.h:33:49: note: expected 'int *' but argument is of type 'struct nand_chip *'
+   33 |                                            int *maf_id, int *dev_id,

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/mtd/nand/raw/mt7621_nand.c

index 2fd89349392bc613cc9c92b7c308f50328ba247c..9763ae6dc51adc625eb621c6bf1d09295ab2d957 100644 (file)
@@ -1186,7 +1186,7 @@ int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc)
        int nand_maf_id, nand_dev_id;
        struct nand_flash_dev *type;
 
-       type = nand_get_flash_type(&nand->mtd, nand, &nand_maf_id,
+       type = nand_get_flash_type(nand, &nand_maf_id,
                                   &nand_dev_id, NULL);
 
        if (IS_ERR(type))