OSDN Git Service

media: vivid: fix module load error when enabling fb and no_error_inj=1
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 25 Jan 2018 11:57:45 +0000 (06:57 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 30 Jan 2018 12:18:22 +0000 (07:18 -0500)
commit0fa2c5f954c41e870fe327907c01cb8f7ea8d5a2
treef563984f889789353645242ef11690001ec2ab3d
parent0f3827351ed39aeca0bea8f99813e2964e10c497
media: vivid: fix module load error when enabling fb and no_error_inj=1

If the framebuffer is enabled and error injection is disabled, then
creating the controls for the video output device would fail with an
error.

This is because the Clear Framebuffer control uses the 'vivid control
class' and that control class isn't added if error injection is disabled.

In addition, this control was added to e.g. vbi devices as well, which
makes no sense.

Move this control to its own control handler and handle it correctly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: <stable@vger.kernel.org> # for v4.15 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/vivid/vivid-core.h
drivers/media/platform/vivid/vivid-ctrls.c