Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: rcar-csi2: set default format if a unsupported one is requested

Instead of failing the set_fmt() if a unsupported format is requested
set a default one and return the changed format to the user.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reported-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Niklas Söderlund and committed by
Mauro Carvalho Chehab
7be8c4f7 769afd21

+1 -1
+1 -1
drivers/media/platform/rcar-vin/rcar-csi2.c
··· 613 613 struct v4l2_mbus_framefmt *framefmt; 614 614 615 615 if (!rcsi2_code_to_fmt(format->format.code)) 616 - return -EINVAL; 616 + format->format.code = rcar_csi2_formats[0].code; 617 617 618 618 if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) { 619 619 priv->mf = format->format;