diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-02 16:32:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-02 16:32:26 -0500 |
commit | ae29a18594c40a344ddd5bcd6abe575786a5d978 (patch) | |
tree | 07e4e7e49ca0a891735e9da20929ddf61606c7ba /drivers/ide/ide-gd.c | |
parent | 0bf82cccd1e17135f880c161bc7926f5b25df34c (diff) | |
parent | 52ebb438e952c674e5a5c131292589db9bcf169b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide-gd: re-get capacity on revalidate
tx4938ide: Avoid underflow on calculation of a wait cycle
tx4938ide: Do not call devm_ioremap for whole 128KB
tx4938ide: Check minimum cycle time and SHWT range (v2)
ide: Switch to a common address
ide-cd: fix DMA alignment regression
Diffstat (limited to 'drivers/ide/ide-gd.c')
-rw-r--r-- | drivers/ide/ide-gd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 7b6662854374..b8078b3231f7 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
@@ -281,7 +281,12 @@ static int ide_gd_media_changed(struct gendisk *disk) | |||
281 | static int ide_gd_revalidate_disk(struct gendisk *disk) | 281 | static int ide_gd_revalidate_disk(struct gendisk *disk) |
282 | { | 282 | { |
283 | struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); | 283 | struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); |
284 | set_capacity(disk, ide_gd_capacity(idkp->drive)); | 284 | ide_drive_t *drive = idkp->drive; |
285 | |||
286 | if (ide_gd_media_changed(disk)) | ||
287 | drive->disk_ops->get_capacity(drive); | ||
288 | |||
289 | set_capacity(disk, ide_gd_capacity(drive)); | ||
285 | return 0; | 290 | return 0; |
286 | } | 291 | } |
287 | 292 | ||