mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: Lee Jones <lee@kernel.org>, Daniel Thompson <danielt@kernel.org>,
	Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de>,
	Tony Lindgren <tony@atomide.com>, Pavel Machek <pavel@ucw.cz>,
	Jean-Jacques Hiblot <jjhiblot@ti.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Saravana Kannan <saravanak@google.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Alexander Sverdlin <alexander.sverdlin@gmail.com>
Subject: Re: [PATCH v5] backlight: led-backlight: add devlink to supplier LEDs
Date: Mon, 19 May 2025 17:47:29 +0200	[thread overview]
Message-ID: <20250519174729.44fa1f7b@bootlin.com> (raw)
In-Reply-To: <20250519-led-backlight-add-devlink-to-supplier-class-device-v5-1-76d6fd4aeb2f@bootlin.com>

Hi Luca,

On Mon, 19 May 2025 17:16:39 +0200
Luca Ceresoli <luca.ceresoli@bootlin.com> wrote:

...

> diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
> index d2db157b2c290adc3a159023e9e2394fc877388c..8fe645b5b75447d009e1045dcf0c62d3bbc5425e 100644
> --- a/drivers/video/backlight/led_bl.c
> +++ b/drivers/video/backlight/led_bl.c
> @@ -209,6 +209,19 @@ static int led_bl_probe(struct platform_device *pdev)
>  		return PTR_ERR(priv->bl_dev);
>  	}
>  
> +	for (i = 0; i < priv->nb_leds; i++) {
> +		struct device_link *link;
> +
> +		link = device_link_add(&pdev->dev, priv->leds[0]->dev->parent,

It should be priv->leds[i]->dev->parent instead of leds[0], shouldn't it?

> +				       DL_FLAG_AUTOREMOVE_CONSUMER);
> +		if (!link) {
> +			dev_err(&pdev->dev, "Failed to add devlink (consumer %s, supplier %s)\n",
> +				dev_name(&pdev->dev), dev_name(priv->leds[0]->dev->parent));

ditto

> +			backlight_device_unregister(priv->bl_dev);
> +			return -EINVAL;
> +		}
> +	}
> +
>  	for (i = 0; i < priv->nb_leds; i++) {
>  		mutex_lock(&priv->leds[i]->led_access);
>  		led_sysfs_disable(priv->leds[i]);
> 

Best regards,
Hervé

  reply	other threads:[~2025-05-19 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 15:16 Luca Ceresoli
2025-05-19 15:47 ` Herve Codina [this message]
2025-05-19 20:15   ` Luca Ceresoli

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=20250519174729.44fa1f7b@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=alexander.sverdlin@gmail.com \
    --cc=daniel.thompson@linaro.org \
    --cc=danielt@kernel.org \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=jjhiblot@ti.com \
    --cc=lee@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=pavel@ucw.cz \
    --cc=saravanak@google.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.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

all inboxes | Powered by JetHome®