aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/xsysace.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-11 16:01:06 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-11 16:01:06 -0700
commitdc8a7b11aa68d6795a46e0a42ce92220d1a6f0cd (patch)
tree7b353684090d23b1e2e3f85bf83df491f04dcc8a /drivers/block/xsysace.c
parentd291676ce8bc1d8ef93488023d04027010596de3 (diff)
parent02a5e0acb3cb85d80d0fe834e366d38a92bbaa22 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: BLOCK: Hide the contents of linux/bio.h if CONFIG_BLOCK=n sysace: HDIO_GETGEO has it's own method for ages drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc drivers/block/cciss.c: kmalloc + memset conversion to kzalloc Clean up duplicate includes in drivers/block/ Fix remap handling by blktrace [PATCH] remove mm/filemap.c:file_send_actor()
Diffstat (limited to 'drivers/block/xsysace.c')
-rw-r--r--drivers/block/xsysace.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index cb27e8863d7..3ede0b63da1 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -902,26 +902,17 @@ static int ace_release(struct inode *inode, struct file *filp)
return 0;
}
-static int ace_ioctl(struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long arg)
+static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)
{
- struct ace_device *ace = inode->i_bdev->bd_disk->private_data;
- struct hd_geometry __user *geo = (struct hd_geometry __user *)arg;
- struct hd_geometry g;
- dev_dbg(ace->dev, "ace_ioctl()\n");
-
- switch (cmd) {
- case HDIO_GETGEO:
- g.heads = ace->cf_id.heads;
- g.sectors = ace->cf_id.sectors;
- g.cylinders = ace->cf_id.cyls;
- g.start = 0;
- return copy_to_user(geo, &g, sizeof(g)) ? -EFAULT : 0;
+ struct ace_device *ace = bdev->bd_disk->private_data;
- default:
- return -ENOTTY;
- }
- return -ENOTTY;
+ dev_dbg(ace->dev, "ace_getgeo()\n");
+
+ geo->heads = ace->cf_id.heads;
+ geo->sectors = ace->cf_id.sectors;
+ geo->cylinders = ace->cf_id.cyls;
+
+ return 0;
}
static struct block_device_operations ace_fops = {
@@ -930,7 +921,7 @@ static struct block_device_operations ace_fops = {
.release = ace_release,
.media_changed = ace_media_changed,
.revalidate_disk = ace_revalidate_disk,
- .ioctl = ace_ioctl,
+ .getgeo = ace_getgeo,
};
/* --------------------------------------------------------------------