aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Trimarchi2022-07-25 10:06:06 +0200
committerMichael Trimarchi2022-08-22 11:15:04 +0200
commitc76f9ddf91b14312e71594459ebb3dd72d885aa8 (patch)
treece67ff83e709a7162c35ba1b8a7665d9dd8ccfca /include
parent8a67acfce24f825b4935c87b2dbd70915d6eeeaa (diff)
mtd: nand: change return type of nand_get_flash_type() to int
Upstream linux commit 4722c0e958e636. The returned "type" is never used in nand_scan_ident() and spl code Make nand_get_flash_type() simply return an integer value in order to avoid unnecessary ERR_PTR/PTR_ERR dance. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/rawnand.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index 8dc2d81dba9..8178f36b49f 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -29,9 +29,8 @@ struct nand_flash_dev;
struct device_node;
/* Get the flash and manufacturer id and lookup if the type is supported. */
-struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip,
- int *maf_id, int *dev_id,
- struct nand_flash_dev *type);
+int nand_get_flash_type(struct nand_chip *chip, int *maf_id, int *dev_id,
+ struct nand_flash_dev *type);
/* Scan and identify a NAND device */
int nand_scan(struct mtd_info *mtd, int max_chips);