diff mbox series

gpio: msc313: Drop empty platform remove function

Message ID 20221212220457.3777685-1-u.kleine-koenig@pengutronix.de
State Accepted
Commit 29f5c6e69f6198219c966acc91f99eb7f2669d61
Headers show
Series gpio: msc313: Drop empty platform remove function | expand

Commit Message

Uwe Kleine-König Dec. 12, 2022, 10:04 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/gpio/gpio-msc313.c | 6 ------
 1 file changed, 6 deletions(-)


base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476

Comments

Romain Perier Dec. 13, 2022, 7:17 p.m. UTC | #1
Hi,

Le lun. 12 déc. 2022 à 23:05, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> a écrit :
>
> 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>

Good catch,

Reviewed-by: Romain Perier <romain.perier@gmail.com>


Regards,
Bartosz Golaszewski Dec. 30, 2022, 10:46 a.m. UTC | #2
On Mon, Dec 12, 2022 at 11:05 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> 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/gpio/gpio-msc313.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c
> index 52d7b8d99170..b0773e5652fa 100644
> --- a/drivers/gpio/gpio-msc313.c
> +++ b/drivers/gpio/gpio-msc313.c
> @@ -655,11 +655,6 @@ static int msc313_gpio_probe(struct platform_device *pdev)
>         return devm_gpiochip_add_data(dev, gpiochip, gpio);
>  }
>
> -static int msc313_gpio_remove(struct platform_device *pdev)
> -{
> -       return 0;
> -}
> -
>  static const struct of_device_id msc313_gpio_of_match[] = {
>  #ifdef CONFIG_MACH_INFINITY
>         {
> @@ -710,6 +705,5 @@ static struct platform_driver msc313_gpio_driver = {
>                 .pm = &msc313_gpio_ops,
>         },
>         .probe = msc313_gpio_probe,
> -       .remove = msc313_gpio_remove,
>  };
>  builtin_platform_driver(msc313_gpio_driver);
>
> base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
> --
> 2.38.1
>

Applied, thanks!

Bartosz
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c
index 52d7b8d99170..b0773e5652fa 100644
--- a/drivers/gpio/gpio-msc313.c
+++ b/drivers/gpio/gpio-msc313.c
@@ -655,11 +655,6 @@  static int msc313_gpio_probe(struct platform_device *pdev)
 	return devm_gpiochip_add_data(dev, gpiochip, gpio);
 }
 
-static int msc313_gpio_remove(struct platform_device *pdev)
-{
-	return 0;
-}
-
 static const struct of_device_id msc313_gpio_of_match[] = {
 #ifdef CONFIG_MACH_INFINITY
 	{
@@ -710,6 +705,5 @@  static struct platform_driver msc313_gpio_driver = {
 		.pm = &msc313_gpio_ops,
 	},
 	.probe = msc313_gpio_probe,
-	.remove = msc313_gpio_remove,
 };
 builtin_platform_driver(msc313_gpio_driver);