[ide] kill current_capacity()

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent dec99512
......@@ -1248,7 +1248,7 @@ static int idedisk_media_changed(struct gendisk *disk)
static int idedisk_revalidate_disk(struct gendisk *disk)
{
ide_drive_t *drive = disk->private_data;
set_capacity(disk, current_capacity(drive));
set_capacity(disk, idedisk_capacity(drive));
return 0;
}
......@@ -1292,7 +1292,7 @@ static int idedisk_attach(ide_drive_t *drive)
strcpy(g->devfs_name, drive->devfs_name);
g->driverfs_dev = &drive->gendev;
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
set_capacity(g, current_capacity(drive));
set_capacity(g, idedisk_capacity(drive));
g->fops = &idedisk_ops;
add_disk(g);
return 0;
......
......@@ -1640,7 +1640,7 @@ static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg)
}
/*
* Return the current floppy capacity to ide.c.
* Return the current floppy capacity.
*/
static sector_t idefloppy_capacity (ide_drive_t *drive)
{
......@@ -2034,7 +2034,7 @@ static int idefloppy_media_changed(struct gendisk *disk)
static int idefloppy_revalidate_disk(struct gendisk *disk)
{
ide_drive_t *drive = disk->private_data;
set_capacity(disk, current_capacity(drive));
set_capacity(disk, idefloppy_capacity(drive));
return 0;
}
......
......@@ -358,24 +358,6 @@ int ide_system_bus_speed (void)
return system_bus_speed;
}
/**
* current_capacity - drive capacity
* @drive: drive to query
*
* Return the current capacity (in sectors) of a drive according to
* its current geometry/LBA settings. Empty removables are reported
* as size zero.
*/
sector_t current_capacity (ide_drive_t *drive)
{
if (!drive->present)
return 0;
return DRIVER(drive)->capacity(drive);
}
EXPORT_SYMBOL(current_capacity);
static int ide_open (struct inode * inode, struct file * filp)
{
return -ENXIO;
......
......@@ -1187,11 +1187,6 @@ extern void ide_fixstring(u8 *, const int, const int);
*/
extern int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long);
/*
* Return the current idea about the total capacity of this drive.
*/
extern sector_t current_capacity (ide_drive_t *drive);
/*
* Start a reset operation for an IDE interface.
* The caller should return immediately after invoking this.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment