diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2013-07-14 16:05:56 -0700 |
---|---|---|
committer | Richard Zhu <Richard.Zhu@freescale.com> | 2014-11-07 12:57:38 +0800 |
commit | 73a409b03c3af42fe17adc774c569439b85b50cf (patch) | |
tree | 2b8640665cfc552090ecb2934320f7385d0d3408 /fs | |
parent | 4518d6333dab5ee5db3d7c2e3de00632446d4816 (diff) |
sysfs: prevent warning when only using binary attributes
When only using bin_attrs instead of attrs the kernel prints a warning
and refuses to create the sysfs entry. This fixes that.
Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8f14c8fa7b2800a25fdb02be99b91104a88c4d7f)
Diffstat (limited to 'fs')
-rw-r--r-- | fs/sysfs/group.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index e5719c6095c3..09a1a25cd145 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c @@ -93,8 +93,8 @@ static int internal_create_group(struct kobject *kobj, int update, /* Updates may happen before the object has been instantiated */ if (unlikely(update && !kobj->sd)) return -EINVAL; - if (!grp->attrs) { - WARN(1, "sysfs: attrs not set by subsystem for group: %s/%s\n", + if (!grp->attrs && !grp->bin_attrs) { + WARN(1, "sysfs: (bin_)attrs not set by subsystem for group: %s/%s\n", kobj->name, grp->name ? "" : grp->name); return -EINVAL; } |