diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 19:59:34 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 19:59:34 +0300 |
commit | 594d6d96ea042366878aa7dc7f5711b8c245db5a (patch) | |
tree | 1b7333bf5b5c1147e136f050d686ab4f888ab85f /drivers/nvdimm/bus.c | |
parent | 1b8d2afde54fade94339f573c4e05644f9ae9866 (diff) | |
parent | 45a0dac0451136fa7ae34a6fea53ef6a136287ce (diff) | |
download | linux-594d6d96ea042366878aa7dc7f5711b8c245db5a.tar.xz |
Merge branch 'for-4.7/dax' into libnvdimm-for-next
Diffstat (limited to 'drivers/nvdimm/bus.c')
-rw-r--r-- | drivers/nvdimm/bus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 19f822d7f652..97589e3cb852 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -40,6 +40,8 @@ static int to_nd_device_type(struct device *dev) return ND_DEVICE_REGION_PMEM; else if (is_nd_blk(dev)) return ND_DEVICE_REGION_BLK; + else if (is_nd_dax(dev)) + return ND_DEVICE_DAX_PMEM; else if (is_nd_pmem(dev->parent) || is_nd_blk(dev->parent)) return nd_region_to_nstype(to_nd_region(dev->parent)); @@ -246,6 +248,8 @@ static void nd_async_device_unregister(void *d, async_cookie_t cookie) void __nd_device_register(struct device *dev) { + if (!dev) + return; dev->bus = &nvdimm_bus_type; get_device(dev); async_schedule_domain(nd_async_device_register, dev, |