diff options
author | Martin Wilck <mwilck@suse.com> | 2019-03-27 14:51:04 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-12 13:35:27 -0600 |
commit | 773008f6fe0544aa28140ced0504cefba17381aa (patch) | |
tree | 4df5920521f6c4a2d84e5e1f67cac96151146db9 /drivers/cdrom | |
parent | 3c12c8e94ca04d668ad0cded7857fea2637834b3 (diff) |
Revert "block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers"
This reverts commit 9fd097b14918875bd6f125ed699d7bbbba5893ee.
Instead of leaving disk->events completely empty, we now export the
supported events again, and tell the block layer not to forward events to
user space by not setting DISK_EVENT_FLAG_UEVENT. This allows the block
layer to distinguish between devices that for which events should be
handled in kernel only, and devices which don't support any meda change
events at all.
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/gdrom.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index f8b7345fe1cb..5cf3bade0d57 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c @@ -786,6 +786,7 @@ static int probe_gdrom(struct platform_device *devptr) goto probe_fail_cdrom_register; } gd.disk->fops = &gdrom_bdops; + gd.disk->events = DISK_EVENT_MEDIA_CHANGE; /* latch on to the interrupt */ err = gdrom_set_interrupt_handlers(); if (err) |