lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250519174729.44fa1f7b@bootlin.com>
Date: Mon, 19 May 2025 17:47:29 +0200
From: Herve Codina <herve.codina@...tlin.com>
To: Luca Ceresoli <luca.ceresoli@...tlin.com>
Cc: Lee Jones <lee@...nel.org>, Daniel Thompson <danielt@...nel.org>, Jingoo
 Han <jingoohan1@...il.com>, Helge Deller <deller@....de>, Tony Lindgren
 <tony@...mide.com>, Pavel Machek <pavel@....cz>, Jean-Jacques Hiblot
 <jjhiblot@...com>, Tomi Valkeinen <tomi.valkeinen@...com>, Saravana Kannan
 <saravanak@...gle.com>, Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 Daniel Thompson <daniel.thompson@...aro.org>,
 dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, Alexander Sverdlin
 <alexander.sverdlin@...il.com>
Subject: Re: [PATCH v5] backlight: led-backlight: add devlink to supplier
 LEDs

Hi Luca,

On Mon, 19 May 2025 17:16:39 +0200
Luca Ceresoli <luca.ceresoli@...tlin.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é

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ