aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-gd.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-06-16 12:08:13 -0400
committerJiri Kosina <jkosina@suse.cz>2010-06-16 12:08:13 -0400
commitf1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch)
treec2c130a74be25b0b2dff992e1a195e2728bdaadd /drivers/ide/ide-gd.c
parentfd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff)
parent7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff)
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/ide/ide-gd.c')
-rw-r--r--drivers/ide/ide-gd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c
index 27d9fe08d80b..79399534782c 100644
--- a/drivers/ide/ide-gd.c
+++ b/drivers/ide/ide-gd.c
@@ -288,17 +288,14 @@ static int ide_gd_media_changed(struct gendisk *disk)
288 return ret; 288 return ret;
289} 289}
290 290
291static unsigned long long ide_gd_set_capacity(struct gendisk *disk, 291static void ide_gd_unlock_native_capacity(struct gendisk *disk)
292 unsigned long long capacity)
293{ 292{
294 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); 293 struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj);
295 ide_drive_t *drive = idkp->drive; 294 ide_drive_t *drive = idkp->drive;
296 const struct ide_disk_ops *disk_ops = drive->disk_ops; 295 const struct ide_disk_ops *disk_ops = drive->disk_ops;
297 296
298 if (disk_ops->set_capacity) 297 if (disk_ops->unlock_native_capacity)
299 return disk_ops->set_capacity(drive, capacity); 298 disk_ops->unlock_native_capacity(drive);
300
301 return drive->capacity64;
302} 299}
303 300
304static int ide_gd_revalidate_disk(struct gendisk *disk) 301static int ide_gd_revalidate_disk(struct gendisk *disk)
@@ -329,7 +326,7 @@ static const struct block_device_operations ide_gd_ops = {
329 .locked_ioctl = ide_gd_ioctl, 326 .locked_ioctl = ide_gd_ioctl,
330 .getgeo = ide_gd_getgeo, 327 .getgeo = ide_gd_getgeo,
331 .media_changed = ide_gd_media_changed, 328 .media_changed = ide_gd_media_changed,
332 .set_capacity = ide_gd_set_capacity, 329 .unlock_native_capacity = ide_gd_unlock_native_capacity,
333 .revalidate_disk = ide_gd_revalidate_disk 330 .revalidate_disk = ide_gd_revalidate_disk
334}; 331};
335 332