workqueue: Replace usage of init_name with dev_set_name()
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Feb 2016 20:04:41 +0000 (21:04 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 17 Feb 2016 21:14:18 +0000 (16:14 -0500)
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>
kernel/workqueue.c

index 7ff5dc7d2ac5f47395bc3be8484c642c5d577b6b..3a1c99b0c1b3c6d540675fa3d5a2e4ee666b77e6 100644 (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
This page took 0.028312 seconds and 5 git commands to generate.