diff options
Diffstat (limited to 'drivers/block/aoe/aoeblk.c')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index b82654e883a..1747dd272cd 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -90,7 +90,7 @@ static DEVICE_ATTR(state, S_IRUGO, aoedisk_show_state, NULL); static DEVICE_ATTR(mac, S_IRUGO, aoedisk_show_mac, NULL); static DEVICE_ATTR(netif, S_IRUGO, aoedisk_show_netif, NULL); static struct device_attribute dev_attr_firmware_version = { - .attr = { .name = "firmware-version", .mode = S_IRUGO, .owner = THIS_MODULE }, + .attr = { .name = "firmware-version", .mode = S_IRUGO }, .show = aoedisk_show_fwver, }; @@ -118,13 +118,11 @@ aoedisk_rm_sysfs(struct aoedev *d) } static int -aoeblk_open(struct inode *inode, struct file *filp) +aoeblk_open(struct block_device *bdev, fmode_t mode) { - struct aoedev *d; + struct aoedev *d = bdev->bd_disk->private_data; ulong flags; - d = inode->i_bdev->bd_disk->private_data; - spin_lock_irqsave(&d->lock, flags); if (d->flags & DEVFL_UP) { d->nopen++; @@ -136,13 +134,11 @@ aoeblk_open(struct inode *inode, struct file *filp) } static int -aoeblk_release(struct inode *inode, struct file *filp) +aoeblk_release(struct gendisk *disk, fmode_t mode) { - struct aoedev *d; + struct aoedev *d = disk->private_data; ulong flags; - d = inode->i_bdev->bd_disk->private_data; - spin_lock_irqsave(&d->lock, flags); if (--d->nopen == 0) { |