Commit 20c82fff authored by Cai Huoqing's avatar Cai Huoqing Committed by Mauro Carvalho Chehab
Browse files

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: default avatarCai Huoqing <caihuoqing@baidu.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 62cea52a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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 = 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++) {