]> 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 11dc7e69c4fb51d1a0cd801efa7982aecde91b49..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) {
@@ -875,7 +875,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info,
  * @info: The controller instance.
  * @nmtd: The driver version of the MTD instance.
  *
- * This routine is called after the chip probe has succesfully completed
+ * This routine is called after the chip probe has successfully completed
  * and the relevant per-chip information updated. This call ensure that
  * we update the internal state accordingly.
  *
@@ -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);