diff options
Diffstat (limited to 'drivers/mtd/devices/block2mtd.c')
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index aa557beb8f51..f29a6f9df6e7 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -247,7 +247,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) | |||
247 | return NULL; | 247 | return NULL; |
248 | 248 | ||
249 | /* Get a handle on the device */ | 249 | /* Get a handle on the device */ |
250 | bdev = open_bdev_exclusive(devname, mode, dev); | 250 | bdev = blkdev_get_by_path(devname, mode, dev); |
251 | #ifndef MODULE | 251 | #ifndef MODULE |
252 | if (IS_ERR(bdev)) { | 252 | if (IS_ERR(bdev)) { |
253 | 253 | ||
@@ -256,7 +256,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) | |||
256 | 256 | ||
257 | dev_t devt = name_to_dev_t(devname); | 257 | dev_t devt = name_to_dev_t(devname); |
258 | if (devt) | 258 | if (devt) |
259 | bdev = open_by_devnum(devt, mode, dev); | 259 | bdev = blkdev_get_by_dev(devt, mode, dev); |
260 | } | 260 | } |
261 | #endif | 261 | #endif |
262 | 262 | ||