libnvdimm, pmem: use devm_add_action to release bdev resources
commit030b99e39cad33b104474fbe688e0eb23d8209b4
authorDan Williams <dan.j.williams@intel.com>
Fri, 18 Mar 2016 03:24:31 +0000 (17 20:24 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 22 Apr 2016 19:26:23 +0000 (22 12:26 -0700)
treeedbcc412b1dcedd8abe08535686931e0c7868b8f
parent9d90725ddca347450c4ab177ad680ed76063afd4
libnvdimm, pmem: 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/pmem.c