Merge branch 'for-2.6.33' of git://linux-nfs.org/~bfields/linux
[sfrench/cifs-2.6.git] / arch / arm / plat-s3c / dev-nand.c
index e771e77dcd54011f82e70e11f6810c7953ab44f4..84808ccda70ebf8e528d6aa5e44ba36048b17a2c 100644 (file)
@@ -114,7 +114,7 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand)
                
                for (i = 0; i < npd->nr_sets; i++) {
                        ret = s3c_nand_copy_set(to);
-                       if (!ret) {
+                       if (ret) {
                                printk(KERN_ERR "%s: failed to copy set %d\n",
                                __func__, i);
                                return;
@@ -122,6 +122,8 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand)
                        to++;
                }
        }
+
+       s3c_device_nand.dev.platform_data = npd;
 }
 
 EXPORT_SYMBOL_GPL(s3c_nand_set_platdata);