diff options
Diffstat (limited to 'drivers/nvdimm/namespace_devs.c')
| -rw-r--r-- | drivers/nvdimm/namespace_devs.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index c96e31330213..5f1c6756e57c 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c | |||
| @@ -14,10 +14,10 @@ | |||
| 14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
| 15 | #include <linux/sort.h> | 15 | #include <linux/sort.h> |
| 16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 17 | #include <linux/pmem.h> | ||
| 18 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 19 | #include <linux/nd.h> | 18 | #include <linux/nd.h> |
| 20 | #include "nd-core.h" | 19 | #include "nd-core.h" |
| 20 | #include "pmem.h" | ||
| 21 | #include "nd.h" | 21 | #include "nd.h" |
| 22 | 22 | ||
| 23 | static void namespace_io_release(struct device *dev) | 23 | static void namespace_io_release(struct device *dev) |
| @@ -112,7 +112,7 @@ static int is_uuid_busy(struct device *dev, void *data) | |||
| 112 | 112 | ||
| 113 | static int is_namespace_uuid_busy(struct device *dev, void *data) | 113 | static int is_namespace_uuid_busy(struct device *dev, void *data) |
| 114 | { | 114 | { |
| 115 | if (is_nd_pmem(dev) || is_nd_blk(dev)) | 115 | if (is_nd_region(dev)) |
| 116 | return device_for_each_child(dev, data, is_uuid_busy); | 116 | return device_for_each_child(dev, data, is_uuid_busy); |
| 117 | return 0; | 117 | return 0; |
| 118 | } | 118 | } |
| @@ -155,11 +155,7 @@ bool pmem_should_map_pages(struct device *dev) | |||
| 155 | IORES_DESC_NONE) == REGION_MIXED) | 155 | IORES_DESC_NONE) == REGION_MIXED) |
| 156 | return false; | 156 | return false; |
| 157 | 157 | ||
| 158 | #ifdef ARCH_MEMREMAP_PMEM | ||
| 159 | return ARCH_MEMREMAP_PMEM == MEMREMAP_WB; | 158 | return ARCH_MEMREMAP_PMEM == MEMREMAP_WB; |
| 160 | #else | ||
| 161 | return false; | ||
| 162 | #endif | ||
| 163 | } | 159 | } |
| 164 | EXPORT_SYMBOL(pmem_should_map_pages); | 160 | EXPORT_SYMBOL(pmem_should_map_pages); |
| 165 | 161 | ||
| @@ -810,7 +806,7 @@ static int __reserve_free_pmem(struct device *dev, void *data) | |||
| 810 | struct nd_label_id label_id; | 806 | struct nd_label_id label_id; |
| 811 | int i; | 807 | int i; |
| 812 | 808 | ||
| 813 | if (!is_nd_pmem(dev)) | 809 | if (!is_memory(dev)) |
| 814 | return 0; | 810 | return 0; |
| 815 | 811 | ||
| 816 | nd_region = to_nd_region(dev); | 812 | nd_region = to_nd_region(dev); |
| @@ -2057,7 +2053,7 @@ static struct device *nd_namespace_pmem_create(struct nd_region *nd_region) | |||
| 2057 | struct resource *res; | 2053 | struct resource *res; |
| 2058 | struct device *dev; | 2054 | struct device *dev; |
| 2059 | 2055 | ||
| 2060 | if (!is_nd_pmem(&nd_region->dev)) | 2056 | if (!is_memory(&nd_region->dev)) |
| 2061 | return NULL; | 2057 | return NULL; |
| 2062 | 2058 | ||
| 2063 | nspm = kzalloc(sizeof(*nspm), GFP_KERNEL); | 2059 | nspm = kzalloc(sizeof(*nspm), GFP_KERNEL); |
| @@ -2360,7 +2356,7 @@ static struct device **scan_labels(struct nd_region *nd_region) | |||
| 2360 | } | 2356 | } |
| 2361 | dev->parent = &nd_region->dev; | 2357 | dev->parent = &nd_region->dev; |
| 2362 | devs[count++] = dev; | 2358 | devs[count++] = dev; |
| 2363 | } else if (is_nd_pmem(&nd_region->dev)) { | 2359 | } else if (is_memory(&nd_region->dev)) { |
| 2364 | /* clean unselected labels */ | 2360 | /* clean unselected labels */ |
| 2365 | for (i = 0; i < nd_region->ndr_mappings; i++) { | 2361 | for (i = 0; i < nd_region->ndr_mappings; i++) { |
| 2366 | struct list_head *l, *e; | 2362 | struct list_head *l, *e; |
