diff options
author | Christoph Hellwig <hch@lst.de> | 2007-08-11 16:34:31 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-08-11 16:34:48 -0400 |
commit | a6b3a93e15b2925a151e9ae13dcb93ad7b3e48aa (patch) | |
tree | 42640043e31911129ba44efc4fcb8e19e5e27ef0 /drivers/block | |
parent | 2e4934aa4586832c35e077191849a06f93e4a9a0 (diff) |
sysace: HDIO_GETGEO has it's own method for ages
The way this driver tries to implement HDIO_GETGEO it'll never be called.
Then again on ppc it probably will never be called anyway because it's
utterly pointless.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/xsysace.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index cb27e8863d7c..3ede0b63da13 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) | |||
902 | return 0; | 902 | return 0; |
903 | } | 903 | } |
904 | 904 | ||
905 | static int ace_ioctl(struct inode *inode, struct file *filp, | 905 | static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo) |
906 | unsigned int cmd, unsigned long arg) | ||
907 | { | 906 | { |
908 | struct ace_device *ace = inode->i_bdev->bd_disk->private_data; | 907 | struct ace_device *ace = bdev->bd_disk->private_data; |
909 | struct hd_geometry __user *geo = (struct hd_geometry __user *)arg; | ||
910 | struct hd_geometry g; | ||
911 | dev_dbg(ace->dev, "ace_ioctl()\n"); | ||
912 | |||
913 | switch (cmd) { | ||
914 | case HDIO_GETGEO: | ||
915 | g.heads = ace->cf_id.heads; | ||
916 | g.sectors = ace->cf_id.sectors; | ||
917 | g.cylinders = ace->cf_id.cyls; | ||
918 | g.start = 0; | ||
919 | return copy_to_user(geo, &g, sizeof(g)) ? -EFAULT : 0; | ||
920 | 908 | ||
921 | default: | 909 | dev_dbg(ace->dev, "ace_getgeo()\n"); |
922 | return -ENOTTY; | 910 | |
923 | } | 911 | geo->heads = ace->cf_id.heads; |
924 | return -ENOTTY; | 912 | geo->sectors = ace->cf_id.sectors; |
913 | geo->cylinders = ace->cf_id.cyls; | ||
914 | |||
915 | return 0; | ||
925 | } | 916 | } |
926 | 917 | ||
927 | static struct block_device_operations ace_fops = { | 918 | static struct block_device_operations ace_fops = { |
@@ -930,7 +921,7 @@ static struct block_device_operations ace_fops = { | |||
930 | .release = ace_release, | 921 | .release = ace_release, |
931 | .media_changed = ace_media_changed, | 922 | .media_changed = ace_media_changed, |
932 | .revalidate_disk = ace_revalidate_disk, | 923 | .revalidate_disk = ace_revalidate_disk, |
933 | .ioctl = ace_ioctl, | 924 | .getgeo = ace_getgeo, |
934 | }; | 925 | }; |
935 | 926 | ||
936 | /* -------------------------------------------------------------------- | 927 | /* -------------------------------------------------------------------- |