]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mtd/nand/s3c2410.c
mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident()
[net-next-2.6.git] / drivers / mtd / nand / s3c2410.c
index 68b5b3a486a9c66571ad0012c4337b81d3a23841..dc02dcd0c08f60f7c0c0978b688a64244083e9ec 100644 (file)
@@ -774,7 +774,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
        chip->select_chip  = s3c2410_nand_select_chip;
        chip->chip_delay   = 50;
        chip->priv         = nmtd;
-       chip->options      = 0;
+       chip->options      = set->options;
        chip->controller   = &info->controller;
 
        switch (info->cpu_type) {
@@ -957,7 +957,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
 
        /* currently we assume we have the one resource */
        res  = pdev->resource;
-       size = res->end - res->start + 1;
+       size = resource_size(res);
 
        info->area = request_mem_region(res->start, size, pdev->name);
 
@@ -1013,7 +1013,8 @@ static int s3c24xx_nand_probe(struct platform_device *pdev)
                s3c2410_nand_init_chip(info, nmtd, sets);
 
                nmtd->scan_res = nand_scan_ident(&nmtd->mtd,
-                                                (sets) ? sets->nr_chips : 1);
+                                                (sets) ? sets->nr_chips : 1,
+                                                NULL);
 
                if (nmtd->scan_res == 0) {
                        s3c2410_nand_update_chip(info, nmtd);