mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
mtd, ubi, ubifs: update for the sync with linux v3.14
while playing with the new mtd/ubi/ubifs sync, found some small updates for it: - add del_mtd_partition() to include/linux/mtd/mtd - mtd: add a debug_printf - remove some not used functions Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Tom Rini <trini@ti.com>
This commit is contained in:
parent
ff94bc40af
commit
ddf7bcfa6c
@ -476,6 +476,8 @@ int add_mtd_device(struct mtd_info *mtd)
|
|||||||
the notifier, since we hold the mtd_table_mutex */
|
the notifier, since we hold the mtd_table_mutex */
|
||||||
list_for_each_entry(not, &mtd_notifiers, list)
|
list_for_each_entry(not, &mtd_notifiers, list)
|
||||||
not->add(mtd);
|
not->add(mtd);
|
||||||
|
#else
|
||||||
|
pr_debug("mtd: Giving out device %d to %s\n", i, mtd->name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mutex_unlock(&mtd_table_mutex);
|
mutex_unlock(&mtd_table_mutex);
|
||||||
|
@ -572,6 +572,7 @@ out_register:
|
|||||||
return slave;
|
return slave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __UBOOT__
|
||||||
int mtd_add_partition(struct mtd_info *master, const char *name,
|
int mtd_add_partition(struct mtd_info *master, const char *name,
|
||||||
long long offset, long long length)
|
long long offset, long long length)
|
||||||
{
|
{
|
||||||
@ -651,6 +652,7 @@ int mtd_del_partition(struct mtd_info *master, int partno)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function, given a master MTD object and a partition table, creates
|
* This function, given a master MTD object and a partition table, creates
|
||||||
|
@ -2241,8 +2241,14 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
c->vfs_sb = sb;
|
c->vfs_sb = sb;
|
||||||
|
#ifndef __UBOOT__
|
||||||
/* Re-open the UBI device in read-write mode */
|
/* Re-open the UBI device in read-write mode */
|
||||||
c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READWRITE);
|
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)) {
|
if (IS_ERR(c->ubi)) {
|
||||||
err = PTR_ERR(c->ubi);
|
err = PTR_ERR(c->ubi);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -480,6 +480,7 @@ static inline int mtd_is_bitflip_or_eccerr(int err) {
|
|||||||
#ifdef __UBOOT__
|
#ifdef __UBOOT__
|
||||||
/* drivers/mtd/mtdcore.h */
|
/* drivers/mtd/mtdcore.h */
|
||||||
int add_mtd_device(struct mtd_info *mtd);
|
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 add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
|
||||||
int del_mtd_partitions(struct mtd_info *);
|
int del_mtd_partitions(struct mtd_info *);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user