]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device'
authorDan Williams <dan.j.williams@intel.com>
Mon, 2 Apr 2018 20:14:25 +0000 (13:14 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 3 Apr 2018 18:51:42 +0000 (11:51 -0700)
commitb46b4f0786599c5adb656a2a2dc4bb5a042280bb
treeec5ad09b16c163b79d0cbb59714fae785648ac96
parent577fba41828fd1508254fa9abcdb117cfac0d898
libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device'

For debug, it is useful for bus providers to be able to retrieve the
'struct device' associated with an nd_region instance that it
registered. We already have to_nd_region() to perform the reverse cast
operation, in fact its duplicate declaration can be removed from the
private drivers/nvdimm/nd.h header.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/nd.h
drivers/nvdimm/region_devs.c
include/linux/libnvdimm.h