libnvdimm, blk: use devm_add_action to release bdev resources
authorDan Williams <dan.j.williams@intel.com>
Fri, 18 Mar 2016 03:08:28 +0000 (20:08 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 22 Apr 2016 19:26:22 +0000 (12:26 -0700)
commitd29cee120eb890027c69f5fe7cce8bd6a663900a
treed427aa25124dc9a83002432d92d8063874c7b5a8
parente32bc729a3a486e20443db3379ecf67240b20616
libnvdimm, blk: use devm_add_action to release bdev resources

Register a callback to clean up the request_queue and put the gendisk at
driver disable time.

Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/blk.c