mtd: nand: Rename nand_get_flash_type() into nand_detect()
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 24 May 2016 18:55:33 +0000 (20:55 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 8 Mar 2017 22:21:17 +0000 (23:21 +0100)
Since commit 4722c0e958e6 ("mtd: nand: change return type of
nand_get_flash_type() to int"), nand_get_flash_type() no longer returns
a nand_flash_dev object.
Rename the function to match this new behavior.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Richard Weinberger <richard@nod.at>
drivers/mtd/nand/nand_base.c

index 16b082fb89f4467124bf061ba5921b38e363de1a..b1eb99e84044500a8a0ba3c8e5bfa2c6c8985686 100644 (file)
@@ -4050,8 +4050,7 @@ static bool find_full_id_nand(struct nand_chip *chip,
 /*
  * Get the flash and manufacturer id and lookup if the type is supported.
  */
-static int nand_get_flash_type(struct nand_chip *chip,
-                              struct nand_flash_dev *type)
+static int nand_detect(struct nand_chip *chip, struct nand_flash_dev *type)
 {
        struct mtd_info *mtd = nand_to_mtd(chip);
        int busw;
@@ -4408,7 +4407,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
        nand_set_defaults(chip);
 
        /* Read the flash type */
-       ret = nand_get_flash_type(chip, table);
+       ret = nand_detect(chip, table);
        if (ret) {
                if (!(chip->options & NAND_SCAN_SILENT_NODEV))
                        pr_warn("No NAND device found\n");