diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:03:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 12:03:12 -0400 |
commit | 2be508d847392e431759e370d21cea9412848758 (patch) | |
tree | be5e00a4d7be4ef353ffe4d550fb80a251d321c3 /drivers/mtd/ubi/cdev.c | |
parent | 01e8ef11bc1a74e65678ed55795f59266d4add01 (diff) | |
parent | 8a1a6272057e2ad90ab531a70330165888866e60 (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (69 commits)
Revert "[MTD] m25p80.c code cleanup"
[MTD] [NAND] GPIO driver depends on ARM... for now.
[MTD] [NAND] sh_flctl: fix compile error
[MTD] [NOR] AT49BV6416 has swapped erase regions
[MTD] [NAND] GPIO NAND flash driver
[MTD] cmdlineparts documentation change - explain where mtd-id comes from
[MTD] cfi_cmdset_0002.c: Add Macronix CFI V1.0 TopBottom detection
[MTD] [NAND] Fix compilation warnings in drivers/mtd/nand/cs553x_nand.c
[JFFS2] Write buffer offset adjustment for NOR-ECC (Sibley) flash
[MTD] mtdoops: Fix a bug where block may not be erased
[MTD] mtdoops: Add a magic number to logged kernel oops
[MTD] mtdoops: Fix an off by one error
[JFFS2] Correct parameter names of jffs2_compress() in comments
[MTD] [NAND] sh_flctl: add support for Renesas SuperH FLCTL
[MTD] [NAND] Bug on atmel_nand HW ECC : OOB info not correctly written
[MTD] [MAPS] Remove unused variable after ROM API cleanup.
[MTD] m25p80.c extended jedec support (v2)
[MTD] remove unused mtd parameter in of_mtd_parse_partitions()
[MTD] [NAND] remove dead Kconfig associated with !CONFIG_PPC_MERGE
[MTD] [NAND] driver extension to support NAND on TQM85xx modules
...
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 6 |
1 files changed, 1 insertions, 5 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 | ||