diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2024-09-27 00:49:07 +0200 |
---|---|---|
committer | Frederic Weisbecker <frederic@kernel.org> | 2025-01-08 18:15:03 +0100 |
commit | b04e317b522630b46f78ee62ecbdc5734e8d43de (patch) | |
tree | 8becba4f285448112cfe2de10b86a6c1b67e0cd8 /drivers/platform/chrome/cros_ec_spi.c | |
parent | 41f70d8e16349c65abdc0dd88a7d0ab94e5ce639 (diff) |
treewide: Introduce kthread_run_worker[_on_cpu]()
kthread_create() creates a kthread without running it yet. kthread_run()
creates a kthread and runs it.
On the other hand, kthread_create_worker() creates a kthread worker and
runs it.
This difference in behaviours is confusing. Also there is no way to
create a kthread worker and affine it using kthread_bind_mask() or
kthread_affine_preferred() before starting it.
Consolidate the behaviours and introduce kthread_run_worker[_on_cpu]()
that behaves just like kthread_run(). kthread_create_worker[_on_cpu]()
will now only create a kthread worker without starting it.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Diffstat (limited to 'drivers/platform/chrome/cros_ec_spi.c')
-rw-r--r-- | drivers/platform/chrome/cros_ec_spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/chrome/cros_ec_spi.c b/drivers/platform/chrome/cros_ec_spi.c index 86a3d32a7763..08f566cc1480 100644 --- a/drivers/platform/chrome/cros_ec_spi.c +++ b/drivers/platform/chrome/cros_ec_spi.c @@ -715,7 +715,7 @@ static int cros_ec_spi_devm_high_pri_alloc(struct device *dev, int err; ec_spi->high_pri_worker = - kthread_create_worker(0, "cros_ec_spi_high_pri"); + kthread_run_worker(0, "cros_ec_spi_high_pri"); if (IS_ERR(ec_spi->high_pri_worker)) { err = PTR_ERR(ec_spi->high_pri_worker); |