]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/mtdpart.c
nand: Remove CONFIG_MTD_NAND_VERIFY_WRITE
[karo-tx-uboot.git] / drivers / mtd / mtdpart.c
index d20b8578e7644ce1cba2323ae489c6c4db7d3206..cfbaa3d9a0cbbfda3e6dda66dd889a20c95aca31 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/types.h>
@@ -178,11 +177,12 @@ static int part_read_user_prot_reg(struct mtd_info *mtd, loff_t from,
                                                 retlen, buf);
 }
 
-static int part_get_user_prot_info(struct mtd_info *mtd,
-               struct otp_info *buf, size_t len)
+static int part_get_user_prot_info(struct mtd_info *mtd, size_t len,
+                                  size_t *retlen, struct otp_info *buf)
 {
        struct mtd_part *part = PART(mtd);
-       return part->master->_get_user_prot_info(part->master, buf, len);
+       return part->master->_get_user_prot_info(part->master, len, retlen,
+                                                buf);
 }
 
 static int part_read_fact_prot_reg(struct mtd_info *mtd, loff_t from,
@@ -193,11 +193,12 @@ static int part_read_fact_prot_reg(struct mtd_info *mtd, loff_t from,
                                                 retlen, buf);
 }
 
-static int part_get_fact_prot_info(struct mtd_info *mtd, struct otp_info *buf,
-               size_t len)
+static int part_get_fact_prot_info(struct mtd_info *mtd, size_t len,
+                                  size_t *retlen, struct otp_info *buf)
 {
        struct mtd_part *part = PART(mtd);
-       return part->master->_get_fact_prot_info(part->master, buf, len);
+       return part->master->_get_fact_prot_info(part->master, len, retlen,
+                                                buf);
 }
 
 static int part_write(struct mtd_info *mtd, loff_t to, size_t len,
@@ -572,6 +573,7 @@ out_register:
        return slave;
 }
 
+#ifndef __UBOOT__
 int mtd_add_partition(struct mtd_info *master, const char *name,
                      long long offset, long long length)
 {
@@ -651,6 +653,7 @@ int mtd_del_partition(struct mtd_info *master, int partno)
        return ret;
 }
 EXPORT_SYMBOL_GPL(mtd_del_partition);
+#endif
 
 /*
  * This function, given a master MTD object and a partition table, creates