workqueue: Replace usage of init_name with dev_set_name()

The init_name property of the device struct is sort of a hack and should
only be used for statically allocated devices. Since the device is
dynamically allocated here it is safe to use the proper way to set a
devices name by calling dev_set_name().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Lars-Peter Clausen 2016-02-17 21:04:41 +01:00 committed by Tejun Heo
parent d6e022f1d2
commit 23217b443b
1 changed files with 1 additions and 1 deletions

View File

@ -5222,8 +5222,8 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
wq_dev->wq = wq;
wq_dev->dev.bus = &wq_subsys;
wq_dev->dev.init_name = wq->name;
wq_dev->dev.release = wq_device_release;
dev_set_name(&wq_dev->dev, "%s", wq->name);
/*
* unbound_attrs are created separately. Suppress uevent until