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
58265826
58275827 static int __init wq_sysfs_init(void)
58285828 {
5829+ struct device *dev_root;
58295830 int err;
58305831
58315832 err = subsys_virtual_register(&wq_subsys, NULL);
58325833 if (err)
58335834 return err;
58345835
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;
58365842 }
58375843 core_initcall(wq_sysfs_init);
58385844

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