summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/region_devs.c
diff options
context:
space:
mode:
authorDmitry Krivenok <krivenok.dmitry@gmail.com>2015-12-02 09:39:29 +0300
committerDan Williams <dan.j.williams@intel.com>2015-12-09 03:27:30 +0300
commit6bb691ac089c39bb0aa73bdcc21ffd8c846e4ba5 (patch)
tree3b09b9aad08d0eb874557c939b1091cb75522282 /drivers/nvdimm/region_devs.c
parentbd26d0d0ce7434a86dde61a7c65c94fe3801d8f6 (diff)
downloadlinux-6bb691ac089c39bb0aa73bdcc21ffd8c846e4ba5.tar.xz
nvdimm: do not show pfn_seed for non pmem regions
This simple change hides pfn_seed attribute for non pmem regions because they don't support pfn anyway. Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/region_devs.c')
-rw-r--r--drivers/nvdimm/region_devs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index 529f3f02e7b2..3d730d1f25db 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -406,6 +406,9 @@ static umode_t region_visible(struct kobject *kobj, struct attribute *a, int n)
struct nd_interleave_set *nd_set = nd_region->nd_set;
int type = nd_region_to_nstype(nd_region);
+ if (!is_nd_pmem(dev) && a == &dev_attr_pfn_seed.attr)
+ return 0;
+
if (a != &dev_attr_set_cookie.attr
&& a != &dev_attr_available_size.attr)
return a->mode;