Commit 0b58b4e3 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c

Commit cafb0bfc (staging: Convert to bdops->check_events())
incorrectly set bd->user_disk_0->events while initializing
bd->user_disk_1.  Fix it.

The problem was spotted by Milton's suspect code pattern detector.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 9ced0b95
...@@ -1191,7 +1191,7 @@ static int cyasblkdev_add_disks(int bus_num, ...@@ -1191,7 +1191,7 @@ static int cyasblkdev_add_disks(int bus_num,
bd->user_disk_1->first_minor = (devidx + 1) << CYASBLKDEV_SHIFT; bd->user_disk_1->first_minor = (devidx + 1) << CYASBLKDEV_SHIFT;
bd->user_disk_1->minors = 8; bd->user_disk_1->minors = 8;
bd->user_disk_1->fops = &cyasblkdev_bdops; bd->user_disk_1->fops = &cyasblkdev_bdops;
bd->user_disk_0->events = DISK_EVENT_MEDIA_CHANGE; bd->user_disk_1->events = DISK_EVENT_MEDIA_CHANGE;
bd->user_disk_1->private_data = bd; bd->user_disk_1->private_data = bd;
bd->user_disk_1->queue = bd->queue.queue; bd->user_disk_1->queue = bd->queue.queue;
bd->dbgprn_flags = DBGPRN_RD_RQ; bd->dbgprn_flags = DBGPRN_RD_RQ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment