aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtd_blkdevs.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index f9329794f3b5..cb20c67995d8 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -37,7 +37,6 @@
37 37
38#include "mtdcore.h" 38#include "mtdcore.h"
39 39
40static DEFINE_MUTEX(mtd_blkdevs_mutex);
41static LIST_HEAD(blktrans_majors); 40static LIST_HEAD(blktrans_majors);
42static DEFINE_MUTEX(blktrans_ref_mutex); 41static DEFINE_MUTEX(blktrans_ref_mutex);
43 42
@@ -185,7 +184,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
185 if (!dev) 184 if (!dev)
186 return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/ 185 return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/
187 186
188 mutex_lock(&mtd_blkdevs_mutex);
189 mutex_lock(&dev->lock); 187 mutex_lock(&dev->lock);
190 188
191 if (dev->open++) 189 if (dev->open++)
@@ -202,7 +200,6 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
202unlock: 200unlock:
203 mutex_unlock(&dev->lock); 201 mutex_unlock(&dev->lock);
204 blktrans_dev_put(dev); 202 blktrans_dev_put(dev);
205 mutex_unlock(&mtd_blkdevs_mutex);
206 return ret; 203 return ret;
207} 204}
208 205
@@ -214,7 +211,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
214 if (!dev) 211 if (!dev)
215 return ret; 212 return ret;
216 213
217 mutex_lock(&mtd_blkdevs_mutex);
218 mutex_lock(&dev->lock); 214 mutex_lock(&dev->lock);
219 215
220 if (--dev->open) 216 if (--dev->open)
@@ -230,7 +226,6 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
230unlock: 226unlock:
231 mutex_unlock(&dev->lock); 227 mutex_unlock(&dev->lock);
232 blktrans_dev_put(dev); 228 blktrans_dev_put(dev);
233 mutex_unlock(&mtd_blkdevs_mutex);
234 return ret; 229 return ret;
235} 230}
236 231
@@ -263,7 +258,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
263 if (!dev) 258 if (!dev)
264 return ret; 259 return ret;
265 260
266 mutex_lock(&mtd_blkdevs_mutex);
267 mutex_lock(&dev->lock); 261 mutex_lock(&dev->lock);
268 262
269 if (!dev->mtd) 263 if (!dev->mtd)
@@ -278,7 +272,6 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
278 } 272 }
279unlock: 273unlock:
280 mutex_unlock(&dev->lock); 274 mutex_unlock(&dev->lock);
281 mutex_unlock(&mtd_blkdevs_mutex);
282 blktrans_dev_put(dev); 275 blktrans_dev_put(dev);
283 return ret; 276 return ret;
284} 277}