提交 a6b3a93e 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

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: NChristoph Hellwig <hch@lst.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 2e4934aa
......@@ -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,
};
/* --------------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册