mtd: rawnand: Pass a nand_chip object to nand_scan()
[sfrench/cifs-2.6.git] / drivers / mtd / nand / raw / mpc5121_nfc.c
index 6d1740d54e0de7e9794de892ed1afb61120bddab..efaaec462bd71ede353b7a53224a26243e7984f0 100644 (file)
@@ -515,16 +515,6 @@ static u8 mpc5121_nfc_read_byte(struct mtd_info *mtd)
        return tmp;
 }
 
-/* Read word from NFC buffers */
-static u16 mpc5121_nfc_read_word(struct mtd_info *mtd)
-{
-       u16 tmp;
-
-       mpc5121_nfc_read_buf(mtd, (u_char *)&tmp, sizeof(tmp));
-
-       return tmp;
-}
-
 /*
  * Read NFC configuration from Reset Config Word
  *
@@ -703,7 +693,6 @@ static int mpc5121_nfc_probe(struct platform_device *op)
        chip->dev_ready = mpc5121_nfc_dev_ready;
        chip->cmdfunc = mpc5121_nfc_command;
        chip->read_byte = mpc5121_nfc_read_byte;
-       chip->read_word = mpc5121_nfc_read_word;
        chip->read_buf = mpc5121_nfc_read_buf;
        chip->write_buf = mpc5121_nfc_write_buf;
        chip->select_chip = mpc5121_nfc_select_chip;
@@ -778,7 +767,7 @@ static int mpc5121_nfc_probe(struct platform_device *op)
        }
 
        /* Detect NAND chips */
-       retval = nand_scan(mtd, be32_to_cpup(chips_no));
+       retval = nand_scan(chip, be32_to_cpup(chips_no));
        if (retval) {
                dev_err(dev, "NAND Flash not found !\n");
                goto error;