skd: register block device only if some devices are present
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 5 Nov 2013 11:37:02 +0000 (12:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Nov 2013 16:10:30 +0000 (09:10 -0700)
commitb8df6647c248db457f1c2fb4f0f6350beaf16f9e
treeabe07e5b81ddf74d9f48eec03995a3524001713a
parentfbed149ab328b72f501a3344ab4f20f712c63392
skd: register block device only if some devices are present

Register block device in skd_pci_probe() instead of in skd_init() so it
is registered only if some devices are present (currently it is always
registered when the driver is loaded). Please note that this change
depends on the fact that register_blkdev(0, ...) never returns 0.

Cc: Akhil Bhansali <abhansali@stec-inc.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/skd_main.c