[media] saa7146: replace current->state by set_current_state()
authorFabian Frederick <fabf@skynet.be>
Fri, 20 Feb 2015 18:12:54 +0000 (15:12 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 3 Mar 2015 14:15:42 +0000 (11:15 -0300)
commitf35593fdc8851aa28f6949bd48fe90653d383017
tree3a531488b29fbd73f4527528633892f81a8013ef
parent809abdbf46377abe39a72884d026979bb1dbd6d3
[media] saa7146: replace current->state by set_current_state()

Use helper functions to access current->state.
Direct assignments are prone to races and therefore buggy.

current->state = TASK_RUNNING can be replaced by __set_current_state()

Thanks to Peter Zijlstra for the exact definition of the problem.

Suggested-By: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/common/saa7146/saa7146_vbi.c