diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-10-21 11:41:42 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-11-15 11:12:01 +0300 |
commit | 20c82fffd6d2bcc35ae63bad81df150b20301ec7 (patch) | |
tree | d7092ba25601ac4ad851b625e5349fdfe36a40da /drivers/media/usb | |
parent | 62cea52ad4bead0ae4be2cfe1142eb0aae0e9fbd (diff) | |
download | linux-20c82fffd6d2bcc35ae63bad81df150b20301ec7.tar.xz |
media: gspca: Make use of the helper macro kthread_run()
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/gspca/m5602/m5602_s5k83a.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c index bc4008d5d116..4504d615b1e4 100644 --- a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c +++ b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c @@ -339,14 +339,13 @@ int s5k83a_start(struct sd *sd) /* Create another thread, polling the GPIO ports of the camera to check if it got rotated. This is how the windows driver does it so we have to assume that there is no better way of accomplishing this */ - sd->rotation_thread = kthread_create(rotation_thread_function, - sd, "rotation thread"); + sd->rotation_thread = kthread_run(rotation_thread_function, + sd, "rotation thread"); if (IS_ERR(sd->rotation_thread)) { err = PTR_ERR(sd->rotation_thread); sd->rotation_thread = NULL; return err; } - wake_up_process(sd->rotation_thread); /* Preinit the sensor */ for (i = 0; i < ARRAY_SIZE(start_s5k83a) && !err; i++) { |