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] [day] [month] [year] [list]
Date:   Sat, 5 Jun 2021 15:07:21 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <linux-leds@...r.kernel.org>
CC:     <pavel@....cz>
Subject: Re: [PATCH -next] leds: wm831x-status: use
 devm_led_classdev_register()

This patch is wrong, ignore it.

On 2021/6/5 11:22, Yang Yingliang wrote:
> Use devm_led_classdev_register() for led device registration and
> get rid of .remove callback to remove led device. This is done by
> managed device framework.
>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
>   drivers/leds/leds-wm831x-status.c | 12 +-----------
>   1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/leds/leds-wm831x-status.c b/drivers/leds/leds-wm831x-status.c
> index c48b80574f02..8ccd8b472572 100644
> --- a/drivers/leds/leds-wm831x-status.c
> +++ b/drivers/leds/leds-wm831x-status.c
> @@ -269,7 +269,7 @@ static int wm831x_status_probe(struct platform_device *pdev)
>   	drvdata->cdev.blink_set = wm831x_status_blink_set;
>   	drvdata->cdev.groups = wm831x_status_groups;
>   
> -	ret = led_classdev_register(wm831x->dev, &drvdata->cdev);
> +	ret = devm_led_classdev_register(wm831x->dev, &drvdata->cdev);
>   	if (ret < 0) {
>   		dev_err(&pdev->dev, "Failed to register LED: %d\n", ret);
>   		return ret;
> @@ -280,21 +280,11 @@ static int wm831x_status_probe(struct platform_device *pdev)
>   	return 0;
>   }
>   
> -static int wm831x_status_remove(struct platform_device *pdev)
> -{
> -	struct wm831x_status *drvdata = platform_get_drvdata(pdev);
> -
> -	led_classdev_unregister(&drvdata->cdev);
> -
> -	return 0;
> -}
> -
>   static struct platform_driver wm831x_status_driver = {
>   	.driver = {
>   		   .name = "wm831x-status",
>   		   },
>   	.probe = wm831x_status_probe,
> -	.remove = wm831x_status_remove,
>   };
>   
>   module_platform_driver(wm831x_status_driver);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ