diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-01 18:02:17 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-01 18:02:17 +0100 |
commit | 3af4182cc5be7d5505f9801ee3297373f1872446 (patch) | |
tree | 214348d40ed547a72f9612a7e5c94a01afded812 /drivers/ide/ide-gd.c | |
parent | f5d4c67e41a262f0cdfaec1bb0fa8e5952187ef9 (diff) | |
parent | c07f62e5f18123103459ff74e86af1518a5b8af5 (diff) | |
download | talos-obmc-linux-3af4182cc5be7d5505f9801ee3297373f1872446.tar.gz talos-obmc-linux-3af4182cc5be7d5505f9801ee3297373f1872446.zip |
Merge branch 'upstream' into topic/asoc
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) static int ide_gd_revalidate_disk(struct gendisk *disk) { struct ide_disk_obj *idkp = ide_drv_g(disk, ide_disk_obj); - set_capacity(disk, ide_gd_capacity(idkp->drive)); + ide_drive_t *drive = idkp->drive; + + if (ide_gd_media_changed(disk)) + drive->disk_ops->get_capacity(drive); + + set_capacity(disk, ide_gd_capacity(drive)); return 0; } |