lkml.org 
[lkml]   [2019]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/4] media: atmel: atmel-isc: make try_fmt error less verbose
Date
From: Eugen Hristev <eugen.hristev@microchip.com>

In case the sensor refuses to set the format, avoid printing the error
message that no compatible format was found.
This means that the try_fmt will be less verbose.
The error will be printed only if really a format cannot be found.
Some application try all possible formats in a row (gstreamer e.g.)
which will flood the console with error messages until a working one is found.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
drivers/media/platform/atmel/atmel-isc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index 777e27f..da3b441 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1487,7 +1487,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f,
ret = v4l2_subdev_call(isc->current_subdev->sd, pad, set_fmt,
&pad_cfg, &format);
if (ret < 0)
- goto isc_try_fmt_err;
+ goto isc_try_fmt_subdev_err;

v4l2_fill_pix_format(pixfmt, &format.format);

@@ -1502,6 +1502,7 @@ static int isc_try_fmt(struct isc_device *isc, struct v4l2_format *f,

isc_try_fmt_err:
v4l2_err(&isc->v4l2_dev, "Could not find any possible format for a working pipeline\n");
+isc_try_fmt_subdev_err:
memset(&isc->try_config, 0, sizeof(isc->try_config));

return ret;
--
2.7.4
\
 
 \ /
  Last update: 2019-04-15 16:15    [W:0.033 / U:5.484 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site