the notifier, since we hold the mtd_table_mutex */
list_for_each_entry(not, &mtd_notifiers, list)
not->add(mtd);
+#else
+ pr_debug("mtd: Giving out device %d to %s\n", i, mtd->name);
#endif
mutex_unlock(&mtd_table_mutex);
return slave;
}
+#ifndef __UBOOT__
int mtd_add_partition(struct mtd_info *master, const char *name,
long long offset, long long length)
{
return ret;
}
EXPORT_SYMBOL_GPL(mtd_del_partition);
+#endif
/*
* This function, given a master MTD object and a partition table, creates
int err;
c->vfs_sb = sb;
+#ifndef __UBOOT__
/* Re-open the UBI device in read-write mode */
c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READWRITE);
+#else
+ /* U-Boot read only mode */
+ c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READONLY);
+#endif
+
if (IS_ERR(c->ubi)) {
err = PTR_ERR(c->ubi);
goto out;
#ifdef __UBOOT__
/* drivers/mtd/mtdcore.h */
int add_mtd_device(struct mtd_info *mtd);
+int del_mtd_device(struct mtd_info *mtd);
int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
int del_mtd_partitions(struct mtd_info *);
#endif