diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2016-02-17 21:04:41 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-02-17 16:14:18 -0500 |
commit | 23217b443b4b0439c8b55d3be0482d3cd7fbc5ac (patch) | |
tree | 2bc6a4587f59dd9a15a40cb2e1d285cf27d96acd | |
parent | d6e022f1d207a161cd88e08ef0371554680ffc46 (diff) |
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>
-rw-r--r-- | kernel/workqueue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 7ff5dc7d2ac5..3a1c99b0c1b3 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -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 |