diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-18 06:47:37 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-18 06:47:37 -0400 |
commit | a52c8afdd035a72da55756d5e7f9fb35cc62dcf5 (patch) | |
tree | 18d6a6e15b971de99dd2264f3ab219523bdd2773 | |
parent | faa5c2a15e14b6a4e59fcae65dec5258e723ea9f (diff) | |
parent | 762a9f291bfdf9e4d5c2b80d730d79055c8d8c99 (diff) |
Merge branch 'master' of git://git.infradead.org/ubi-2.6
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 6 | ||||
-rw-r--r-- | drivers/mtd/ubi/scan.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 03c759b4eeb5..b30a0b83d7f1 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -104,12 +104,9 @@ static int vol_cdev_open(struct inode *inode, struct file *file) | |||
104 | struct ubi_volume_desc *desc; | 104 | struct ubi_volume_desc *desc; |
105 | int vol_id = iminor(inode) - 1, mode, ubi_num; | 105 | int vol_id = iminor(inode) - 1, mode, ubi_num; |
106 | 106 | ||
107 | lock_kernel(); | ||
108 | ubi_num = ubi_major2num(imajor(inode)); | 107 | ubi_num = ubi_major2num(imajor(inode)); |
109 | if (ubi_num < 0) { | 108 | if (ubi_num < 0) |
110 | unlock_kernel(); | ||
111 | return ubi_num; | 109 | return ubi_num; |
112 | } | ||
113 | 110 | ||
114 | if (file->f_mode & FMODE_WRITE) | 111 | if (file->f_mode & FMODE_WRITE) |
115 | mode = UBI_READWRITE; | 112 | mode = UBI_READWRITE; |
@@ -119,7 +116,6 @@ static int vol_cdev_open(struct inode *inode, struct file *file) | |||
119 | dbg_gen("open volume %d, mode %d", vol_id, mode); | 116 | dbg_gen("open volume %d, mode %d", vol_id, mode); |
120 | 117 | ||
121 | desc = ubi_open_volume(ubi_num, vol_id, mode); | 118 | desc = ubi_open_volume(ubi_num, vol_id, mode); |
122 | unlock_kernel(); | ||
123 | if (IS_ERR(desc)) | 119 | if (IS_ERR(desc)) |
124 | return PTR_ERR(desc); | 120 | return PTR_ERR(desc); |
125 | 121 | ||
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 967bb4406df9..4f2daa5bbecf 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -387,7 +387,7 @@ int ubi_scan_add_used(struct ubi_device *ubi, struct ubi_scan_info *si, | |||
387 | pnum, vol_id, lnum, ec, sqnum, bitflips); | 387 | pnum, vol_id, lnum, ec, sqnum, bitflips); |
388 | 388 | ||
389 | sv = add_volume(si, vol_id, pnum, vid_hdr); | 389 | sv = add_volume(si, vol_id, pnum, vid_hdr); |
390 | if (IS_ERR(sv) < 0) | 390 | if (IS_ERR(sv)) |
391 | return PTR_ERR(sv); | 391 | return PTR_ERR(sv); |
392 | 392 | ||
393 | if (si->max_sqnum < sqnum) | 393 | if (si->max_sqnum < sqnum) |
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 217d0e111b2a..333c8941552f 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -244,8 +244,8 @@ static int vtbl_check(const struct ubi_device *ubi, | |||
244 | } | 244 | } |
245 | 245 | ||
246 | if (reserved_pebs > ubi->good_peb_count) { | 246 | if (reserved_pebs > ubi->good_peb_count) { |
247 | dbg_err("too large reserved_pebs, good PEBs %d", | 247 | dbg_err("too large reserved_pebs %d, good PEBs %d", |
248 | ubi->good_peb_count); | 248 | reserved_pebs, ubi->good_peb_count); |
249 | err = 9; | 249 | err = 9; |
250 | goto bad; | 250 | goto bad; |
251 | } | 251 | } |