diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-21 10:50:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-21 10:50:56 -0700 |
commit | 91e8549bde9e5cc88c5a2e8c8114389279e240b5 (patch) | |
tree | 5d5432c2a8a066ecf92e0eec9f07e8b96a6be198 /drivers/ide/ide-gd.c | |
parent | 37fc67c9f0454f7a6448d87225cfee8067fd731d (diff) | |
parent | 7eec77a1816a7042591a6cbdb4820e9e7ebffe0e (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd
block: don't propagate unlisted DISK_EVENTs to userland
elevator: check for ELEVATOR_INSERT_SORT_MERGE in !elvpriv case too
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 c4ffd488893..70ea8763567 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; |