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.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -5826,13 +5826,19 @@ static struct device_attribute wq_sysfs_cpumask_attr = · 5825 unmodified lines | |||
| 5826 | 5826 | ||
| 5827 | static int __init wq_sysfs_init(void) | 5827 | static 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 | } |
| 5837 | core_initcall(wq_sysfs_init); | 5843 | core_initcall(wq_sysfs_init); |
| 5838 | 5844 | ||