diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2017-01-20 17:36:45 +0200 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:25:31 +0800 |
commit | 2d4e529d288593f160b1d69c2483c053a4ca6dab (patch) | |
tree | 2b25d30bb66a7c0de4b921859af1c3302c52e1d1 /drivers/media/v4l2-core/v4l2-ioctl.c | |
parent | ea460231175c4da3394053d9be06b778db6b15d0 (diff) |
MLK-13797 v4l2-ioctl: Do not warn on device-specific pixelformat
Since commit ba3002045f8022f3a7e88511c4ebd9876a467ac8 the v4l2 core now
sets the v4l2_fmtdesc->description string based on numeric pixelformat
so that drivers no longer have to contain description strings.
This happens even if the driver already filled the description and
prints an ugly warning if the pixelformat is unknown. Reduce this to
pr_debug if the driver provided a description string.
Fixes https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsw-jira.freescale.net%2Fbrowse%2FMLK-13797&data=01%7C01%7Coctavian.purdila%40nxp.com%7C739251a045b045cfee0f08d4414a2972%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0&sdata=cUsGBObv2wvVfE59KgLujwhlBeRdpR501GplYrYqVrk%3D&reserved=0
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-ioctl.c')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index bee9dfc7962c..d2fc00fda2bc 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1303,9 +1303,12 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_S5C_UYVY_JPG: descr = "S5C73MX interleaved UYVY/JPEG"; break; case V4L2_PIX_FMT_MT21C: descr = "Mediatek Compressed Format"; break; default: - WARN(1, "Unknown pixelformat 0x%08x\n", fmt->pixelformat); - if (fmt->description[0]) + if (!fmt->description[0]) + WARN(1, "Unknown pixelformat 0x%08x\n", fmt->pixelformat); + else { + pr_debug("Custom device pixelformat 0x%08x '%s'\n", fmt->pixelformat, fmt->description); return; + } flags = 0; snprintf(fmt->description, sz, "%c%c%c%c%s", (char)(fmt->pixelformat & 0x7f), |