diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-03-22 08:22:16 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-04-22 21:26:23 +0200 |
commit | 200c79da824c978fcf6eec1dc9c0a1e521133267 (patch) | |
tree | bbc2182ead10eaa034278bb42c01a924db9a7d7d /drivers/nvdimm/blk.c | |
parent | libnvdimm, pmem: clean up resource print / request (diff) | |
download | linux-200c79da824c978fcf6eec1dc9c0a1e521133267.tar.xz linux-200c79da824c978fcf6eec1dc9c0a1e521133267.zip |
libnvdimm, pmem, pfn: make pmem_rw_bytes generic and refactor pfn setup
In preparation for providing an alternative (to block device) access
mechanism to persistent memory, convert pmem_rw_bytes() to
nsio_rw_bytes(). This allows ->rw_bytes() functionality without
requiring a 'struct pmem_device' to be instantiated.
In other words, when ->rw_bytes() is in use i/o is driven through
'struct nd_namespace_io', otherwise it is driven through 'struct
pmem_device' and the block layer. This consolidates the disjoint calls
to devm_exit_badblocks() and devm_memunmap() into a common
devm_nsio_disable() and cleans up the init path to use a unified
pmem_attach_disk() implementation.
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/blk.c')
-rw-r--r-- | drivers/nvdimm/blk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c index 4c14ecdc792b..495e06d9f7e7 100644 --- a/drivers/nvdimm/blk.c +++ b/drivers/nvdimm/blk.c @@ -324,7 +324,7 @@ static int nd_blk_probe(struct device *dev) ndns->rw_bytes = nsblk_rw_bytes; if (is_nd_btt(dev)) return nvdimm_namespace_attach_btt(ndns); - else if (nd_btt_probe(dev, ndns, nsblk) == 0) { + else if (nd_btt_probe(dev, ndns) == 0) { /* we'll come back as btt-blk */ return -ENXIO; } else |