History

workqueue: move to use bus_get_dev_root()

Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for.

Greg Kroah-Hartman committed 3 years ago

Commit 686f6691 parent db281d51 file · +7 −1Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+7−1
@@ -5826,13 +5826,19 @@ static struct device_attribute wq_sysfs_cpumask_attr = · 5825 unmodified lines
5826 5826
5827static int __init wq_sysfs_init(void)5827static int __init wq_sysfs_init(void)
5828{5828{
5829 struct device *dev_root;
5829 int err;5830 int err;
5830 5831
5831 err = subsys_virtual_register(&wq_subsys, NULL);5832 err = subsys_virtual_register(&wq_subsys, NULL);
5832 if (err)5833 if (err)
5833 return err;5834 return err;
5834 5835
5835 return device_create_file(wq_subsys.dev_root, &wq_sysfs_cpumask_attr);5836 dev_root = bus_get_dev_root(&wq_subsys);
5837 if (dev_root) {
5838 err = device_create_file(dev_root, &wq_sysfs_cpumask_attr);
5839 put_device(dev_root);
5840 }
5841 return err;
5836}5842}
5837core_initcall(wq_sysfs_init);5843core_initcall(wq_sysfs_init);
5838 5844

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