]> git.baikalelectronics.ru Git - kernel.git/commit
media: vivid: reorder CEC allocation and control set-up
authorJohan Korsnes <johan.korsnes@gmail.com>
Tue, 18 Jun 2019 07:37:24 +0000 (03:37 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 21:34:06 +0000 (17:34 -0400)
commit8bda6090d6ad82705ec12b4f9224297f233b8dbf
treeedf06d63bbe29093b65004628e3cfdccfcb2145b
parent00763fca3385f85a34addf6e1cceef444d0c4397
media: vivid: reorder CEC allocation and control set-up

CEC adapters and controllers (handlers) are now set up as follows:

1. Allocate CEC adapters: setup of control handlers in next step
   requires these adapters to be allocated.
2. Setup of control handlers: This must be done prior to registering
   and exposing the adapters to user space to avoid a race condition.
3. Register CEC adapters: make them available to user space.

Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: PTR_ERR -> PTR_ERR_OR_ZERO]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vivid/vivid-core.c