media: tvp5150: fix set_selection rectangle handling
authorMarco Felsch <m.felsch@pengutronix.de>
Thu, 12 Mar 2020 10:31:47 +0000 (11:31 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 12 Mar 2020 15:37:46 +0000 (16:37 +0100)
commitb4125e5b1bd70d3d9c22f8926e99c87967d71734
treec5834c76ac257701a5d2743e2692e445347335f5
parentfc79884b00dc5c385bc04bec4cdcd556d0a39981
media: tvp5150: fix set_selection rectangle handling

Currently a local copy of sel->r is made and adapted to the hardware
constraints. After the adaption the value is applied to the hardware but
the driver forgot to reflect the adapted value to the user space.

Drop the local copy and work directly on the requested rectangle
instead to fix this.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/tvp5150.c