diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index f3e6e00ece40fc19d6938addfebd086f64c4ef86..ce6d648d767068090c413dc06c966025c40a5649 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -309,7 +309,7 @@ static ssize_t resource_show(struct device *dev, return sprintf(buf, "%#llx\n", dev_dax_resource(dev_dax)); } -static DEVICE_ATTR_RO(resource); +static DEVICE_ATTR(resource, 0400, resource_show, NULL); static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -329,8 +329,6 @@ static umode_t dev_dax_visible(struct kobject *kobj, struct attribute *a, int n) if (a == &dev_attr_target_node.attr && dev_dax_target_node(dev_dax) < 0) return 0; - if (a == &dev_attr_resource.attr) - return 0400; return a->mode; }