aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authordyoung@redhat.com <dyoung@redhat.com>2013-05-16 02:31:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-21 12:05:52 -0400
commit97521978c5ea80857d4f4f74d4e1fc93721482cf (patch)
tree7382ef10ce4cae297584ce0c08859da487d0994e /drivers
parent1c04fc3536b9e6d143991a8c5c16b04866baeed6 (diff)
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')
-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,
572 572
573 if (dev) { 573 if (dev) {
574 WARN(((attr->attr.mode & S_IWUGO) && !attr->store), 574 WARN(((attr->attr.mode & S_IWUGO) && !attr->store),
575 "Write permission without 'store'\n"); 575 "Attribute %s: write permission without 'store'\n",
576 attr->attr.name);
576 WARN(((attr->attr.mode & S_IRUGO) && !attr->show), 577 WARN(((attr->attr.mode & S_IRUGO) && !attr->show),
577 "Read permission without 'show'\n"); 578 "Attribute %s: read permission without 'show'\n",
579 attr->attr.name);
578 error = sysfs_create_file(&dev->kobj, &attr->attr); 580 error = sysfs_create_file(&dev->kobj, &attr->attr);
579 } 581 }
580 582