Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195830
b: refs/heads/master
c: af7ad7a
h: refs/heads/master
v: v3
  • Loading branch information
Marc Kleine-Budde authored and Artem Bityutskiy committed May 6, 2010
1 parent 3988833 commit fa6d85a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70d38b9625edba52a809308427f78831c3963f52
refs/heads/master: af7ad7a0a6c0c1d8497a25b6b8b3b2ce9f52ff04
25 changes: 23 additions & 2 deletions trunk/drivers/mtd/ubi/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
/* Maximum length of the 'mtd=' parameter */
#define MTD_PARAM_LEN_MAX 64

#ifdef CONFIG_MTD_UBI_MODULE
#define ubi_is_module() 1
#else
#define ubi_is_module() 0
#endif

/**
* struct mtd_dev_param - MTD device parameter description data structure.
* @name: MTD character device node path, MTD device name, or MTD device number
Expand Down Expand Up @@ -1206,9 +1212,24 @@ static int __init ubi_init(void)
p->vid_hdr_offs);
mutex_unlock(&ubi_devices_mutex);
if (err < 0) {
put_mtd_device(mtd);
ubi_err("cannot attach mtd%d", mtd->index);
goto out_detach;
put_mtd_device(mtd);

/*
* Originally UBI stopped initializing on any error.
* However, later on it was found out that this
* behavior is not very good when UBI is compiled into
* the kernel and the MTD devices to attach are passed
* through the command line. Indeed, UBI failure
* stopped whole boot sequence.
*
* To fix this, we changed the behavior for the
* non-module case, but preserved the old behavior for
* the module case, just for compatibility. This is a
* little inconsistent, though.
*/
if (ubi_is_module())
goto out_detach;
}
}

Expand Down

0 comments on commit fa6d85a

Please sign in to comment.