diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-19 17:00:06 +1000 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-19 17:00:06 +1000 |
| commit | 4c8440666b995f20604852b35dcfdbcc1d5931f1 (patch) | |
| tree | b3b6cd65ee275ba1adf9d2c050063f30ebbadb91 /drivers/ide/ide-gd.c | |
| parent | 751e1f5099f1568444fe2485f2485ca541d4952e (diff) | |
| parent | c560bbceaf6b06e52f1ef20131b76a3fdc0a2c19 (diff) | |
Merge branch 'merge' into next
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 c4ffd4888939..70ea8763567d 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c @@ -298,6 +298,12 @@ static unsigned int ide_gd_check_events(struct gendisk *disk, return 0; } + /* + * The following is used to force revalidation on the first open on + * removeable devices, and never gets reported to userland as + * genhd->events is 0. This is intended as removeable ide disk + * can't really detect MEDIA_CHANGE events. + */ ret = drive->dev_flags & IDE_DFLAG_MEDIA_CHANGED; drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED; @@ -413,7 +419,6 @@ static int ide_gd_probe(ide_drive_t *drive) if (drive->dev_flags & IDE_DFLAG_REMOVABLE) g->flags = GENHD_FL_REMOVABLE; g->fops = &ide_gd_ops; - g->events = DISK_EVENT_MEDIA_CHANGE; add_disk(g); return 0; |
