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>] [day] [month] [year] [list]
Message-ID: <20210605051409.1851974-1-yangyingliang@huawei.com>
Date:   Sat, 5 Jun 2021 13:14:09 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     <linux-kernel@...r.kernel.org>, <linux-leds@...r.kernel.org>
CC:     <pavel@....cz>
Subject: [PATCH -next] leds: leds-asic3: use devm_led_classdev_register()

Use devm_led_classdev_register() for led device registration
and remove led_classdev_unregister() in .remove(). This is done
by managed device framework.

Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
 drivers/leds/leds-asic3.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/leds/leds-asic3.c b/drivers/leds/leds-asic3.c
index 8cbc1b8bafa5..e01d33431633 100644
--- a/drivers/leds/leds-asic3.c
+++ b/drivers/leds/leds-asic3.c
@@ -110,7 +110,7 @@ static int asic3_led_probe(struct platform_device *pdev)
 	led->cdev->blink_set = blink_set;
 	led->cdev->default_trigger = led->default_trigger;
 
-	ret = led_classdev_register(&pdev->dev, led->cdev);
+	ret = devm_led_classdev_register(&pdev->dev, led->cdev);
 	if (ret < 0)
 		goto out;
 
@@ -123,10 +123,6 @@ static int asic3_led_probe(struct platform_device *pdev)
 
 static int asic3_led_remove(struct platform_device *pdev)
 {
-	struct asic3_led *led = dev_get_platdata(&pdev->dev);
-
-	led_classdev_unregister(led->cdev);
-
 	return mfd_cell_disable(pdev);
 }
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ