diff mbox series

[1/3] platform/x86: acerhdf: Drop empty platform remove function

Message ID 20221213162359.651529-2-u.kleine-koenig@pengutronix.de (mailing list archive)
State Accepted, archived
Headers show
Series platform/x86: Drop empty platform remove functions | expand

Commit Message

Uwe Kleine-König Dec. 13, 2022, 4:23 p.m. UTC
A remove callback just returning 0 is equivalent to no remove callback
at all. So drop the useless function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/platform/x86/acerhdf.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Peter Kaestle Jan. 12, 2023, 10:16 p.m. UTC | #1
Hi Uwe,

thanks for the reminder and sorry for not answering in first place. Somehow this mail slipped through.

13. Dezember 2022 17:24, "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> schrieb:

> A remove callback just returning 0 is equivalent to no remove callback
> at all. So drop the useless function.

Makes sense to me, could you please point me to the code, which is actually calling the remove function. I'd like to understand how it's handling drivers without registered remove callback.

Thanks.

> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/platform/x86/acerhdf.c | 6 ------
> 1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
> index d2c0fc38c201..ed49393d22ed 100644
> --- a/drivers/platform/x86/acerhdf.c
> +++ b/drivers/platform/x86/acerhdf.c
> @@ -565,11 +565,6 @@ static int acerhdf_probe(struct platform_device *device)
> return 0;
> }
> 
> -static int acerhdf_remove(struct platform_device *device)
> -{
> - return 0;
> -}
> -
> static const struct dev_pm_ops acerhdf_pm_ops = {
> .suspend = acerhdf_suspend,
> .freeze = acerhdf_suspend,
> @@ -581,7 +576,6 @@ static struct platform_driver acerhdf_driver = {
> .pm = &acerhdf_pm_ops,
> },
> .probe = acerhdf_probe,
> - .remove = acerhdf_remove,
> };
> 
> /* check hardware */
> -- 
> 2.38.1
Peter Kaestle Jan. 12, 2023, 10:19 p.m. UTC | #2
Hi again,

found the code, please ignore my previous mail.

13. Dezember 2022 17:24, "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> schrieb:

> A remove callback just returning 0 is equivalent to no remove callback
> at all. So drop the useless function.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Peter Kaestle <peter@piie.net>

> ---
> drivers/platform/x86/acerhdf.c | 6 ------
> 1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
> index d2c0fc38c201..ed49393d22ed 100644
> --- a/drivers/platform/x86/acerhdf.c
> +++ b/drivers/platform/x86/acerhdf.c
> @@ -565,11 +565,6 @@ static int acerhdf_probe(struct platform_device *device)
> return 0;
> }
> 
> -static int acerhdf_remove(struct platform_device *device)
> -{
> - return 0;
> -}
> -
> static const struct dev_pm_ops acerhdf_pm_ops = {
> .suspend = acerhdf_suspend,
> .freeze = acerhdf_suspend,
> @@ -581,7 +576,6 @@ static struct platform_driver acerhdf_driver = {
> .pm = &acerhdf_pm_ops,
> },
> .probe = acerhdf_probe,
> - .remove = acerhdf_remove,
> };
> 
> /* check hardware */
> -- 
> 2.38.1
diff mbox series

Patch

diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index d2c0fc38c201..ed49393d22ed 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -565,11 +565,6 @@  static int acerhdf_probe(struct platform_device *device)
 	return 0;
 }
 
-static int acerhdf_remove(struct platform_device *device)
-{
-	return 0;
-}
-
 static const struct dev_pm_ops acerhdf_pm_ops = {
 	.suspend = acerhdf_suspend,
 	.freeze  = acerhdf_suspend,
@@ -581,7 +576,6 @@  static struct platform_driver acerhdf_driver = {
 		.pm    = &acerhdf_pm_ops,
 	},
 	.probe = acerhdf_probe,
-	.remove = acerhdf_remove,
 };
 
 /* check hardware */