aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/pfn_devs.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2020-07-20 15:08:13 -0700
committerVishal Verma <vishal.l.verma@intel.com>2020-07-28 12:21:10 -0600
commit5cf81ce1893da01fede18c6749eafd4bc1c5ae9b (patch)
tree8e967db481acb05abdb10a663fee3c205fe63092 /drivers/nvdimm/pfn_devs.c
parentdriver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW} (diff)
downloadlinux-dev-5cf81ce1893da01fede18c6749eafd4bc1c5ae9b.tar.xz
linux-dev-5cf81ce1893da01fede18c6749eafd4bc1c5ae9b.zip
libnvdimm: Convert to DEVICE_ATTR_ADMIN_RO()
Move libnvdimm sysfs attributes that currently use an open coded DEVICE_ATTR() to hide sensitive root-only information (physical memory layout) to the new DEVICE_ATTR_ADMIN_RO() helper. Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Diffstat (limited to 'drivers/nvdimm/pfn_devs.c')
-rw-r--r--drivers/nvdimm/pfn_devs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 34db557dbad1..3e11ef8d3f5b 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -218,7 +218,7 @@ static ssize_t resource_show(struct device *dev,
return rc;
}
-static DEVICE_ATTR(resource, 0400, resource_show, NULL);
+static DEVICE_ATTR_ADMIN_RO(resource);
static ssize_t size_show(struct device *dev,
struct device_attribute *attr, char *buf)