OSDN Git Service

media: vivid: add vivid_create_queue() helper
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Sun, 3 Nov 2019 14:01:42 +0000 (15:01 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 8 Nov 2019 06:34:22 +0000 (07:34 +0100)
commit0c90f649d2f5b9c6c585cab293a4e40172ddaa73
treef8ba2784859dc0f399e73f51a0bf6b70f0e6532e
parent1318372450954b4fcd4b3886703286103b040ded
media: vivid: add vivid_create_queue() helper

Refactor some of the vivid_create_instance code by using a
new vivid_create_queue() helper function.

Also add some sanity checks for the node_types vs input/output_types
module options.

This patch resolves these two smatch parse errors:

drivers/media/platform/vivid/vivid-core.c:1679 vivid_create_instance() parse error: OOM: 3002600Kb sm_state_count = 6160113
drivers/media/platform/vivid/vivid-core.c: drivers/media/platform/vivid/vivid-core.c:1679
vivid_create_instance() parse error: __split_smt: function too hairy.  Giving up after 33 seconds

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/vivid/vivid-cec.c
drivers/media/platform/vivid/vivid-core.c
drivers/media/platform/vivid/vivid-core.h