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>
This commit is contained in:
Michael Trimarchi 2022-07-25 10:06:06 +02:00
parent 8a67acfce2
commit c76f9ddf91
4 changed files with 24 additions and 27 deletions

View file

@ -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);