]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/brd.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
[linux-2.6-omap-h63xx.git] / drivers / block / brd.c
index 24b97b0bef994411bda31e377c041da6471ed9a2..bdd4f5f45575bbf1b0bd69df7f68ed09a52a3776 100644 (file)
@@ -340,11 +340,10 @@ static int brd_direct_access (struct block_device *bdev, sector_t sector,
 }
 #endif
 
-static int brd_ioctl(struct inode *inode, struct file *file,
+static int brd_ioctl(struct block_device *bdev, fmode_t mode,
                        unsigned int cmd, unsigned long arg)
 {
        int error;
-       struct block_device *bdev = inode->i_bdev;
        struct brd_device *brd = bdev->bd_disk->private_data;
 
        if (cmd != BLKFLSBUF)
@@ -376,7 +375,7 @@ static int brd_ioctl(struct inode *inode, struct file *file,
 
 static struct block_device_operations brd_fops = {
        .owner =                THIS_MODULE,
-       .ioctl =                brd_ioctl,
+       .locked_ioctl =         brd_ioctl,
 #ifdef CONFIG_BLK_DEV_XIP
        .direct_access =        brd_direct_access,
 #endif
@@ -571,8 +570,8 @@ out_free:
                list_del(&brd->brd_list);
                brd_free(brd);
        }
+       unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
 
-       unregister_blkdev(RAMDISK_MAJOR, "brd");
        return -ENOMEM;
 }