diff mbox series

[09/75] media: imx: capture: Use device name to construct bus_info

Message ID 20210105152852.5733-10-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: imx: Miscellaneous fixes and cleanups for i.MX7 | expand

Commit Message

Laurent Pinchart Jan. 5, 2021, 3:27 p.m. UTC
The v4l2_capability bus_info field is meant to locate the device in the
system. Using a subdev name isn't a good fit, the device name is a much
better option. Use it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/staging/media/imx/imx-media-capture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philipp Zabel Jan. 6, 2021, 2:26 p.m. UTC | #1
On Tue, 2021-01-05 at 17:27 +0200, Laurent Pinchart wrote:
> The v4l2_capability bus_info field is meant to locate the device in the
> system. Using a subdev name isn't a good fit, the device name is a much
> better option. Use it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/staging/media/imx/imx-media-capture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index 21f01ec56bd5..8efe3d753967 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -74,7 +74,7 @@ static int vidioc_querycap(struct file *file, void *fh,
>  	strscpy(cap->driver, IMX_CAPTURE_NAME, sizeof(cap->driver));
>  	strscpy(cap->card, IMX_CAPTURE_NAME, sizeof(cap->card));
>  	snprintf(cap->bus_info, sizeof(cap->bus_info),
> -		 "platform:%s", priv->src_sd->name);
> +		 "platform:%s", dev_name(priv->dev));
>  
>  	return 0;
>  }

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

regards
Philipp
diff mbox series

Patch

diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
index 21f01ec56bd5..8efe3d753967 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -74,7 +74,7 @@  static int vidioc_querycap(struct file *file, void *fh,
 	strscpy(cap->driver, IMX_CAPTURE_NAME, sizeof(cap->driver));
 	strscpy(cap->card, IMX_CAPTURE_NAME, sizeof(cap->card));
 	snprintf(cap->bus_info, sizeof(cap->bus_info),
-		 "platform:%s", priv->src_sd->name);
+		 "platform:%s", dev_name(priv->dev));
 
 	return 0;
 }