diff mbox series

[v2,10/16] media: imx-pxp: Don't set bus_info manually in .querycap()

Message ID 20230112-imx-pxp-v2-10-e2281da1db55@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series media: imx-pxp: add support for i.MX7D | expand

Commit Message

Michael Tretter Jan. 13, 2023, 9:54 a.m. UTC
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

The v4l2_capability.bus_info field is set by the V4L2 core when left
empty by the .querycap() handler. This is the recommended practice, in
order to ensure bus_info coherence between drivers. Don't set it
manually.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changelog

v2:

- Pick from https://lore.kernel.org/linux-media/20230112172507.30579-1-laurent.pinchart@ideasonboard.com
---
 drivers/media/platform/nxp/imx-pxp.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Philipp Zabel Jan. 13, 2023, 11:46 a.m. UTC | #1
On Fr, 2023-01-13 at 10:54 +0100, Michael Tretter wrote:
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> The v4l2_capability.bus_info field is set by the V4L2 core when left
> empty by the .querycap() handler. This is the recommended practice, in
> order to ensure bus_info coherence between drivers. Don't set it
> manually.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp
diff mbox series

Patch

diff --git a/drivers/media/platform/nxp/imx-pxp.c b/drivers/media/platform/nxp/imx-pxp.c
index ad11ac530f96..86ccc3c4aae3 100644
--- a/drivers/media/platform/nxp/imx-pxp.c
+++ b/drivers/media/platform/nxp/imx-pxp.c
@@ -1107,8 +1107,6 @@  static int pxp_querycap(struct file *file, void *priv,
 {
 	strscpy(cap->driver, MEM2MEM_NAME, sizeof(cap->driver));
 	strscpy(cap->card, MEM2MEM_NAME, sizeof(cap->card));
-	snprintf(cap->bus_info, sizeof(cap->bus_info),
-			"platform:%s", MEM2MEM_NAME);
 	return 0;
 }