summaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authordyoung@redhat.com <dyoung@redhat.com>2013-05-16 08:31:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-21 18:05:52 +0200
commit97521978c5ea80857d4f4f74d4e1fc93721482cf (patch)
tree7382ef10ce4cae297584ce0c08859da487d0994e /drivers/base/core.c
parentdriver core: export subsys_virtual_register (diff)
downloadlinux-97521978c5ea80857d4f4f74d4e1fc93721482cf.tar.xz
linux-97521978c5ea80857d4f4f74d4e1fc93721482cf.zip
driver core: print sysfs attribute name when warning about bogus permissions
Make it obvious to see what attribute is using bogus permissions. Signed-off-by: Dave Young <dyoung@redhat.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 016312437577..2499cefdcdf2 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -572,9 +572,11 @@ int device_create_file(struct device *dev,
if (dev) {
WARN(((attr->attr.mode & S_IWUGO) && !attr->store),
- "Write permission without 'store'\n");
+ "Attribute %s: write permission without 'store'\n",
+ attr->attr.name);
WARN(((attr->attr.mode & S_IRUGO) && !attr->show),
- "Read permission without 'show'\n");
+ "Attribute %s: read permission without 'show'\n",
+ attr->attr.name);
error = sysfs_create_file(&dev->kobj, &attr->attr);
}