]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: fix enum formats logic
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 25 Oct 2021 08:06:52 +0000 (09:06 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:41 +0000 (08:11 +0000)
commitb02ff312c680a0b1030074e1980a4e632d7458e7
tree09ffb16e344946b04dc6f4457df58dc891167d77
parent884e99860821e33cbdf94f5f563745d21dec96fe
media: atomisp: fix enum formats logic

Changeset 1a1f86b851e4 ("media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument")
added an extra verification for a pads parameter for enum mbus
format code.

Such change broke atomisp, because now the V4L2 core
refuses to enum MBUS formats if the state is empty.

So, add .which field in order to select the active formats,
in order to make it work again.

While here, improve error messages.

Fixes: 1a1f86b851e4 ("media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c