Message ID | 20180305093535.11801-6-maxime.ripard@bootlin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index 9a25aad8b6b1..e0b39ea641aa 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -357,6 +357,10 @@ static enum csi_input_seq get_csi_input_seq(struct sun6i_csi_dev *sdev, break; } break; + + case V4L2_PIX_FMT_YUYV: + return CSI_INPUT_SEQ_YUYV; + default: dev_warn(sdev->dev, "Unsupported pixformat: 0x%x, defaulting to YUYV\n", pixformat);
Currently, if we ever start a capture using the YUYV format, the switch case in the get_csi_input_seq function will not catch it since it considers it the default case. However, that switch default also calls dev_warn to log an error, which is this case will be either an unsupported format, or the YUYV format. Obviously, the latter creates a spurious message. Make sure this isn't the case. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 4 ++++ 1 file changed, 4 insertions(+)