Skip to content

Commit 23217b4

Browse files
larsclausenhtejun
authored andcommitted
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>
1 parent d6e022f commit 23217b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/workqueue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5222,8 +5222,8 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
52225222

52235223
wq_dev->wq = wq;
52245224
wq_dev->dev.bus = &wq_subsys;
5225-
wq_dev->dev.init_name = wq->name;
52265225
wq_dev->dev.release = wq_device_release;
5226+
dev_set_name(&wq_dev->dev, "%s", wq->name);
52275227

52285228
/*
52295229
* unbound_attrs are created separately. Suppress uevent until

0 commit comments

Comments
 (0)