Driver core fixes for 3.10-rc2
Here are 3 tiny driver core fixes for 3.10-rc2. A needed symbol export, a change to make it easier to track down offending sysfs files with incorrect attributes, and a klist bugfix. All have been in linux-next for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlGePdAACgkQMUfUDdst+ynX3wCfbodTGeimy2GTnc5psVgXV/x4 bz8AnR6G/JNCw54meAJ5UlYJRj7Dwo09 =MNP/ -----END PGP SIGNATURE----- Merge tag 'driver-core-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg Kroah-Hartman: "Here are 3 tiny driver core fixes for 3.10-rc2. A needed symbol export, a change to make it easier to track down offending sysfs files with incorrect attributes, and a klist bugfix. All have been in linux-next for a while" * tag 'driver-core-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: klist: del waiter from klist_remove_waiters before wakeup waitting process driver core: print sysfs attribute name when warning about bogus permissions driver core: export subsys_virtual_register
This commit is contained in:
commit
c7153d0643
3 changed files with 6 additions and 3 deletions
|
@ -1295,6 +1295,7 @@ int subsys_virtual_register(struct bus_type *subsys,
|
||||||
|
|
||||||
return subsys_register(subsys, groups, virtual_dir);
|
return subsys_register(subsys, groups, virtual_dir);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(subsys_virtual_register);
|
||||||
|
|
||||||
int __init buses_init(void)
|
int __init buses_init(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -572,9 +572,11 @@ int device_create_file(struct device *dev,
|
||||||
|
|
||||||
if (dev) {
|
if (dev) {
|
||||||
WARN(((attr->attr.mode & S_IWUGO) && !attr->store),
|
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),
|
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);
|
error = sysfs_create_file(&dev->kobj, &attr->attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,10 +193,10 @@ static void klist_release(struct kref *kref)
|
||||||
if (waiter->node != n)
|
if (waiter->node != n)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
list_del(&waiter->list);
|
||||||
waiter->woken = 1;
|
waiter->woken = 1;
|
||||||
mb();
|
mb();
|
||||||
wake_up_process(waiter->process);
|
wake_up_process(waiter->process);
|
||||||
list_del(&waiter->list);
|
|
||||||
}
|
}
|
||||||
spin_unlock(&klist_remove_lock);
|
spin_unlock(&klist_remove_lock);
|
||||||
knode_set_klist(n, NULL);
|
knode_set_klist(n, NULL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue