media: ov2680: Fix vflip / hflip set functions
authorHans de Goede <hdegoede@redhat.com>
Thu, 3 Aug 2023 09:33:18 +0000 (11:33 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 14 Aug 2023 18:27:55 +0000 (20:27 +0200)
commitd5d08ad330c9ccebc5e066fda815423a290f48b0
tree26e324480c55e4714032a16986cd9de94b80bfec
parent50a7bad4e0a37d7018ab6fe843dd84bc6b2ecf72
media: ov2680: Fix vflip / hflip set functions

ov2680_vflip_disable() / ov2680_hflip_disable() pass BIT(0) instead of
0 as value to ov2680_mod_reg().

While fixing this also:

1. Stop having separate enable/disable functions for hflip / vflip
2. Move the is_streaming check, which is unique to hflip / vflip
   into the ov2680_set_?flip() functions.

for a nice code cleanup.

Fixes: 3ee47cad3e69 ("media: ov2680: Add Omnivision OV2680 sensor driver")
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov2680.c