Skip to content

Commit

Permalink
workqueue: Replace usage of init_name with dev_set_name()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Tejun Heo committed Feb 17, 2016
1 parent d6e022f commit 23217b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23217b4

Please sign in to comment.