]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mtd/nand/atmel_nand.c
mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident()
[net-next-2.6.git] / drivers / mtd / nand / atmel_nand.c
index f8e9975c86e562ca471601ca5f129ee9f402e7cc..04d30887ca7f17580ae0fe9144fb1c7fe676c9c5 100644 (file)
@@ -192,7 +192,6 @@ static int atmel_nand_calculate(struct mtd_info *mtd,
 {
        struct nand_chip *nand_chip = mtd->priv;
        struct atmel_nand_host *host = nand_chip->priv;
-       uint32_t *eccpos = nand_chip->ecc.layout->eccpos;
        unsigned int ecc_value;
 
        /* get the first 2 ECC bytes */
@@ -464,7 +463,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
        if (host->board->det_pin) {
                if (gpio_get_value(host->board->det_pin)) {
                        printk(KERN_INFO "No SmartMedia card inserted.\n");
-                       res = ENXIO;
+                       res = -ENXIO;
                        goto err_no_card;
                }
        }
@@ -475,7 +474,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
        }
 
        /* first scan to find the device and get the page size */
-       if (nand_scan_ident(mtd, 1)) {
+       if (nand_scan_ident(mtd, 1, NULL)) {
                res = -ENXIO;
                goto err_scan_ident;
        }
@@ -535,7 +534,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
 
        if ((!partitions) || (num_partitions == 0)) {
                printk(KERN_ERR "atmel_nand: No partitions defined, or unsupported device.\n");
-               res = ENXIO;
+               res = -ENXIO;
                goto err_no_partitions;
        }