History

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.

Oliver Schinagl committed 13 years ago

Commit 388a8c31 parent 6ab9cea1 file · +2 −2Browse files

Unified · Split

fs/sysfs/group.c+2−2
@@ -93,8 +93,8 @@ static int internal_create_group(struct kobject *kobj, int update, · 92 unmodified lines
9393 /* Updates may happen before the object has been instantiated */
9494 if (unlikely(update && !kobj->sd))
9595 return -EINVAL;
96− if (!grp->attrs) {
97− WARN(1, "sysfs: attrs not set by subsystem for group: %s/%s\n",
96+ if (!grp->attrs && !grp->bin_attrs) {
97+ WARN(1, "sysfs: (bin_)attrs not set by subsystem for group: %s/%s\n",
9898 kobj->name, grp->name ? "" : grp->name);
9999 return -EINVAL;
100100 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t