upstream: [media] wl128x: do not call copy_to_user() while holding spinlocks
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Tue, 7 May 2013 20:57:08 +0000 (17:57 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:47:58 +0000 (11:47 +0900)
commitc523e2e096212db8dd70f1863df0d74e11f66249
treef0b07785318ef0602a94350a83a7a1dded9abcee
parent113b686d48d14b7e0332d92be676b442877e381d
upstream: [media] wl128x: do not call copy_to_user() while holding spinlocks

copy_to_user() must not be called with spinlocks held, but it is in
fmc_transfer_rds_from_internal_buff().
The patch copies data to tmpbuf, releases spinlock and then passes it to userspace.
By the way there is a small unification: replace a couple of hardcoded constants by a macro.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/wl128x/fmdrv_common.c