mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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. Cc: Lai Jiangshan <jiangshanlai@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20230313182918.1312597-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
db281d59e2
commit
686f669780
1 changed files with 7 additions and 1 deletions
|
@ -5826,13 +5826,19 @@ static struct device_attribute wq_sysfs_cpumask_attr =
|
||||||
|
|
||||||
static int __init wq_sysfs_init(void)
|
static int __init wq_sysfs_init(void)
|
||||||
{
|
{
|
||||||
|
struct device *dev_root;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = subsys_virtual_register(&wq_subsys, NULL);
|
err = subsys_virtual_register(&wq_subsys, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
return device_create_file(wq_subsys.dev_root, &wq_sysfs_cpumask_attr);
|
dev_root = bus_get_dev_root(&wq_subsys);
|
||||||
|
if (dev_root) {
|
||||||
|
err = device_create_file(dev_root, &wq_sysfs_cpumask_attr);
|
||||||
|
put_device(dev_root);
|
||||||
|
}
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
core_initcall(wq_sysfs_init);
|
core_initcall(wq_sysfs_init);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue