public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rui Miguel Silva" <rmfrfs@gmail.com>
To: "Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	<linux-media@vger.kernel.org>
Cc: "Steve Longerbeam" <slongerbeam@gmail.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	"Jérôme Brunet" <jbrunet@baylibre.com>,
	"Sakari Ailus" <sakari.ailus@iki.fi>
Subject: Re: [PATCH v1 3/3] staging: media: imx: imx7-mipi-csis: Make subdev name unique
Date: Fri, 07 Jan 2022 10:27:37 +0000	[thread overview]
Message-ID: <CGZDCSRXA4WH.2JN40TTYH62UX@arch-thunder> (raw)
In-Reply-To: <20220106172441.7399-4-laurent.pinchart@ideasonboard.com>

Hi Laurent,
Thanks for the patch.

On Thu Jan 6, 2022 at 5:24 PM WET, Laurent Pinchart wrote:

> When multiple CSIS instances are present in a single graph, they are
> currently all named "imx7-mipi-csis.0", which breaks the entity name
> uniqueness requirement. Fix it by using the device name to create the
> subdev name.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Maybe a Fix tag here to make sure it is backported, since this look to
me a legit bug fix for multiple instances.

Other than that LGTM.

Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>

Cheers,
  Rui
> ---
>  drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
> index d7bcfb1a0c52..6443cca817fe 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -32,7 +32,6 @@
>  #include <media/v4l2-subdev.h>
>  
>  #define CSIS_DRIVER_NAME			"imx7-mipi-csis"
> -#define CSIS_SUBDEV_NAME			CSIS_DRIVER_NAME
>  
>  #define CSIS_PAD_SINK				0
>  #define CSIS_PAD_SOURCE				1
> @@ -313,7 +312,6 @@ struct csi_state {
>  	struct reset_control *mrst;
>  	struct regulator *mipi_phy_regulator;
>  	const struct mipi_csis_info *info;
> -	u8 index;
>  
>  	struct v4l2_subdev sd;
>  	struct media_pad pads[CSIS_PADS_NUM];
> @@ -1329,8 +1327,8 @@ static int mipi_csis_subdev_init(struct csi_state *state)
>  
>  	v4l2_subdev_init(sd, &mipi_csis_subdev_ops);
>  	sd->owner = THIS_MODULE;
> -	snprintf(sd->name, sizeof(sd->name), "%s.%d",
> -		 CSIS_SUBDEV_NAME, state->index);
> +	snprintf(sd->name, sizeof(sd->name), "csis-%s",
> +		 dev_name(state->dev));
>  
>  	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>  	sd->ctrl_handler = NULL;
> -- 
> Regards,
>
> Laurent Pinchart




  reply	other threads:[~2022-01-07 10:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 17:24 [PATCH v1 0/3] staging: media: imx7-mipi-csis: Small improvements Laurent Pinchart
2022-01-06 17:24 ` [PATCH v1 1/3] staging: media: imx: imx7-mipi-csis: Dump MIPI_CSIS_FRAME_COUNTER_CH0 register Laurent Pinchart
2022-01-07 10:27   ` Rui Miguel Silva
2022-01-06 17:24 ` [PATCH v1 2/3] staging: media: imx: imx7_mipi_csis: Add timings override through debugfs Laurent Pinchart
2022-01-07 10:27   ` Rui Miguel Silva
2022-01-07 11:21     ` Laurent Pinchart
2022-01-06 17:24 ` [PATCH v1 3/3] staging: media: imx: imx7-mipi-csis: Make subdev name unique Laurent Pinchart
2022-01-07 10:27   ` Rui Miguel Silva [this message]
2022-01-07 11:52   ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CGZDCSRXA4WH.2JN40TTYH62UX@arch-thunder \
    --to=rmfrfs@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sakari.ailus@iki.fi \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox