mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
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>
This commit is contained in:
parent
2e4934aa45
commit
a6b3a93e15
1 changed files with 9 additions and 18 deletions
|
@ -902,26 +902,17 @@ static int ace_release(struct inode *inode, struct file *filp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ace_ioctl(struct inode *inode, struct file *filp,
|
static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)
|
||||||
unsigned int cmd, unsigned long arg)
|
|
||||||
{
|
{
|
||||||
struct ace_device *ace = inode->i_bdev->bd_disk->private_data;
|
struct ace_device *ace = 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) {
|
dev_dbg(ace->dev, "ace_getgeo()\n");
|
||||||
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;
|
|
||||||
|
|
||||||
default:
|
geo->heads = ace->cf_id.heads;
|
||||||
return -ENOTTY;
|
geo->sectors = ace->cf_id.sectors;
|
||||||
}
|
geo->cylinders = ace->cf_id.cyls;
|
||||||
return -ENOTTY;
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct block_device_operations ace_fops = {
|
static struct block_device_operations ace_fops = {
|
||||||
|
@ -930,7 +921,7 @@ static struct block_device_operations ace_fops = {
|
||||||
.release = ace_release,
|
.release = ace_release,
|
||||||
.media_changed = ace_media_changed,
|
.media_changed = ace_media_changed,
|
||||||
.revalidate_disk = ace_revalidate_disk,
|
.revalidate_disk = ace_revalidate_disk,
|
||||||
.ioctl = ace_ioctl,
|
.getgeo = ace_getgeo,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue