diff mbox series

[2/2] media: vimc: Don't explicitly set bus_info

Message ID 20231129141545.87461-3-sakari.ailus@linux.intel.com
State New
Headers show
Series Don't set bus info for test drivers | expand

Commit Message

Sakari Ailus Nov. 29, 2023, 2:15 p.m. UTC
The platform device name is already set by V4L2 and MC frameworks for
media device bus_info and V4L2 querycap bus_info fields. Don't do it in
the driver.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/test-drivers/vimc/vimc-capture.c | 2 --
 drivers/media/test-drivers/vimc/vimc-core.c    | 2 --
 2 files changed, 4 deletions(-)

Comments

Shuah Khan Jan. 9, 2024, 7:37 p.m. UTC | #1
On 11/29/23 07:15, Sakari Ailus wrote:
> The platform device name is already set by V4L2 and MC frameworks for
> media device bus_info and V4L2 querycap bus_info fields. Don't do it in
> the driver.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>   drivers/media/test-drivers/vimc/vimc-capture.c | 2 --
>   drivers/media/test-drivers/vimc/vimc-core.c    | 2 --
>   2 files changed, 4 deletions(-)
> 
> diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c
> index aa944270e716..1e7cc7c980f9 100644
> --- a/drivers/media/test-drivers/vimc/vimc-capture.c
> +++ b/drivers/media/test-drivers/vimc/vimc-capture.c
> @@ -57,8 +57,6 @@ static int vimc_capture_querycap(struct file *file, void *priv,
>   {
>   	strscpy(cap->driver, VIMC_PDEV_NAME, sizeof(cap->driver));
>   	strscpy(cap->card, KBUILD_MODNAME, sizeof(cap->card));
> -	snprintf(cap->bus_info, sizeof(cap->bus_info),
> -		 "platform:%s", VIMC_PDEV_NAME);
>   
>   	return 0;
>   }
> diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
> index af127476e920..2a924abd0ebc 100644
> --- a/drivers/media/test-drivers/vimc/vimc-core.c
> +++ b/drivers/media/test-drivers/vimc/vimc-core.c
> @@ -366,8 +366,6 @@ static int vimc_probe(struct platform_device *pdev)
>   	/* Initialize media device */
>   	strscpy(vimc->mdev.model, VIMC_MDEV_MODEL_NAME,
>   		sizeof(vimc->mdev.model));
> -	snprintf(vimc->mdev.bus_info, sizeof(vimc->mdev.bus_info),
> -		 "platform:%s", VIMC_PDEV_NAME);
>   	vimc->mdev.dev = &pdev->dev;
>   	media_device_init(&vimc->mdev);
>   

Sorry this seems to have been lost in inbox.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c
index aa944270e716..1e7cc7c980f9 100644
--- a/drivers/media/test-drivers/vimc/vimc-capture.c
+++ b/drivers/media/test-drivers/vimc/vimc-capture.c
@@ -57,8 +57,6 @@  static int vimc_capture_querycap(struct file *file, void *priv,
 {
 	strscpy(cap->driver, VIMC_PDEV_NAME, sizeof(cap->driver));
 	strscpy(cap->card, KBUILD_MODNAME, sizeof(cap->card));
-	snprintf(cap->bus_info, sizeof(cap->bus_info),
-		 "platform:%s", VIMC_PDEV_NAME);
 
 	return 0;
 }
diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c
index af127476e920..2a924abd0ebc 100644
--- a/drivers/media/test-drivers/vimc/vimc-core.c
+++ b/drivers/media/test-drivers/vimc/vimc-core.c
@@ -366,8 +366,6 @@  static int vimc_probe(struct platform_device *pdev)
 	/* Initialize media device */
 	strscpy(vimc->mdev.model, VIMC_MDEV_MODEL_NAME,
 		sizeof(vimc->mdev.model));
-	snprintf(vimc->mdev.bus_info, sizeof(vimc->mdev.bus_info),
-		 "platform:%s", VIMC_PDEV_NAME);
 	vimc->mdev.dev = &pdev->dev;
 	media_device_init(&vimc->mdev);