Linux-RTC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/4] rtc: ab-b5ze-s3: remove .remove
@ 2019-10-21 15:58 Alexandre Belloni
  2019-10-21 15:58 ` [PATCH 2/4] rtc: lpc32xx: " Alexandre Belloni
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-10-21 15:58 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-ab-b5ze-s3.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c
index cdad6f00debf..811fe2005488 100644
--- a/drivers/rtc/rtc-ab-b5ze-s3.c
+++ b/drivers/rtc/rtc-ab-b5ze-s3.c
@@ -900,16 +900,6 @@ static int abb5zes3_probe(struct i2c_client *client,
 	return ret;
 }
 
-static int abb5zes3_remove(struct i2c_client *client)
-{
-	struct abb5zes3_rtc_data *rtc_data = dev_get_drvdata(&client->dev);
-
-	if (rtc_data->irq > 0)
-		device_init_wakeup(&client->dev, false);
-
-	return 0;
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int abb5zes3_rtc_suspend(struct device *dev)
 {
@@ -956,7 +946,6 @@ static struct i2c_driver abb5zes3_driver = {
 		.of_match_table = of_match_ptr(abb5zes3_dt_match),
 	},
 	.probe	  = abb5zes3_probe,
-	.remove	  = abb5zes3_remove,
 	.id_table = abb5zes3_id,
 };
 module_i2c_driver(abb5zes3_driver);
-- 
2.21.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/4] rtc: lpc32xx: remove .remove
  2019-10-21 15:58 [PATCH 1/4] rtc: ab-b5ze-s3: remove .remove Alexandre Belloni
@ 2019-10-21 15:58 ` " Alexandre Belloni
  2019-10-21 15:58 ` [PATCH 3/4] rtc: sirfsoc: " Alexandre Belloni
  2019-10-21 15:58 ` [PATCH 4/4] rtc: sc27xx: " Alexandre Belloni
  2 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-10-21 15:58 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-lpc32xx.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c
index b6a0d4a182bf..15d8abda81fe 100644
--- a/drivers/rtc/rtc-lpc32xx.c
+++ b/drivers/rtc/rtc-lpc32xx.c
@@ -264,16 +264,6 @@ static int lpc32xx_rtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int lpc32xx_rtc_remove(struct platform_device *pdev)
-{
-	struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev);
-
-	if (rtc->irq >= 0)
-		device_init_wakeup(&pdev->dev, 0);
-
-	return 0;
-}
-
 #ifdef CONFIG_PM
 static int lpc32xx_rtc_suspend(struct device *dev)
 {
@@ -355,7 +345,6 @@ MODULE_DEVICE_TABLE(of, lpc32xx_rtc_match);
 
 static struct platform_driver lpc32xx_rtc_driver = {
 	.probe		= lpc32xx_rtc_probe,
-	.remove		= lpc32xx_rtc_remove,
 	.driver = {
 		.name	= "rtc-lpc32xx",
 		.pm	= LPC32XX_RTC_PM_OPS,
-- 
2.21.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/4] rtc: sirfsoc: remove .remove
  2019-10-21 15:58 [PATCH 1/4] rtc: ab-b5ze-s3: remove .remove Alexandre Belloni
  2019-10-21 15:58 ` [PATCH 2/4] rtc: lpc32xx: " Alexandre Belloni
@ 2019-10-21 15:58 ` " Alexandre Belloni
  2019-10-21 15:58 ` [PATCH 4/4] rtc: sc27xx: " Alexandre Belloni
  2 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-10-21 15:58 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-sirfsoc.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/rtc/rtc-sirfsoc.c b/drivers/rtc/rtc-sirfsoc.c
index c759c55359a1..a2c9c55667cd 100644
--- a/drivers/rtc/rtc-sirfsoc.c
+++ b/drivers/rtc/rtc-sirfsoc.c
@@ -365,13 +365,6 @@ static int sirfsoc_rtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int sirfsoc_rtc_remove(struct platform_device *pdev)
-{
-	device_init_wakeup(&pdev->dev, 0);
-
-	return 0;
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int sirfsoc_rtc_suspend(struct device *dev)
 {
@@ -450,7 +443,6 @@ static struct platform_driver sirfsoc_rtc_driver = {
 		.of_match_table = sirfsoc_rtc_of_match,
 	},
 	.probe = sirfsoc_rtc_probe,
-	.remove = sirfsoc_rtc_remove,
 };
 module_platform_driver(sirfsoc_rtc_driver);
 
-- 
2.21.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 4/4] rtc: sc27xx: remove .remove
  2019-10-21 15:58 [PATCH 1/4] rtc: ab-b5ze-s3: remove .remove Alexandre Belloni
  2019-10-21 15:58 ` [PATCH 2/4] rtc: lpc32xx: " Alexandre Belloni
  2019-10-21 15:58 ` [PATCH 3/4] rtc: sirfsoc: " Alexandre Belloni
@ 2019-10-21 15:58 ` " Alexandre Belloni
  2019-10-22  1:56   ` Baolin Wang
  2 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2019-10-21 15:58 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

dpm_sysfs_remove() and device_pm_remove() are already called by
device_del() on device removal so there is no need to call
device_init_wakeup(dev, false) from the driver and it allows to remove the
.remove callback.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-sc27xx.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c
index b95676899750..36810dd40cd3 100644
--- a/drivers/rtc/rtc-sc27xx.c
+++ b/drivers/rtc/rtc-sc27xx.c
@@ -661,12 +661,6 @@ static int sprd_rtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int sprd_rtc_remove(struct platform_device *pdev)
-{
-	device_init_wakeup(&pdev->dev, 0);
-	return 0;
-}
-
 static const struct of_device_id sprd_rtc_of_match[] = {
 	{ .compatible = "sprd,sc2731-rtc", },
 	{ },
@@ -679,7 +673,6 @@ static struct platform_driver sprd_rtc_driver = {
 		.of_match_table = sprd_rtc_of_match,
 	},
 	.probe	= sprd_rtc_probe,
-	.remove = sprd_rtc_remove,
 };
 module_platform_driver(sprd_rtc_driver);
 
-- 
2.21.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 4/4] rtc: sc27xx: remove .remove
  2019-10-21 15:58 ` [PATCH 4/4] rtc: sc27xx: " Alexandre Belloni
@ 2019-10-22  1:56   ` Baolin Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Baolin Wang @ 2019-10-22  1:56 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: linux-rtc, LKML

On Mon, 21 Oct 2019 at 23:58, Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> dpm_sysfs_remove() and device_pm_remove() are already called by
> device_del() on device removal so there is no need to call
> device_init_wakeup(dev, false) from the driver and it allows to remove the
> .remove callback.

Right, feel free to add my tag, thanks.
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>

>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
>  drivers/rtc/rtc-sc27xx.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c
> index b95676899750..36810dd40cd3 100644
> --- a/drivers/rtc/rtc-sc27xx.c
> +++ b/drivers/rtc/rtc-sc27xx.c
> @@ -661,12 +661,6 @@ static int sprd_rtc_probe(struct platform_device *pdev)
>         return 0;
>  }
>
> -static int sprd_rtc_remove(struct platform_device *pdev)
> -{
> -       device_init_wakeup(&pdev->dev, 0);
> -       return 0;
> -}
> -
>  static const struct of_device_id sprd_rtc_of_match[] = {
>         { .compatible = "sprd,sc2731-rtc", },
>         { },
> @@ -679,7 +673,6 @@ static struct platform_driver sprd_rtc_driver = {
>                 .of_match_table = sprd_rtc_of_match,
>         },
>         .probe  = sprd_rtc_probe,
> -       .remove = sprd_rtc_remove,
>  };
>  module_platform_driver(sprd_rtc_driver);
>
> --
> 2.21.0
>


-- 
Baolin Wang
Best Regards

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21 15:58 [PATCH 1/4] rtc: ab-b5ze-s3: remove .remove Alexandre Belloni
2019-10-21 15:58 ` [PATCH 2/4] rtc: lpc32xx: " Alexandre Belloni
2019-10-21 15:58 ` [PATCH 3/4] rtc: sirfsoc: " Alexandre Belloni
2019-10-21 15:58 ` [PATCH 4/4] rtc: sc27xx: " Alexandre Belloni
2019-10-22  1:56   ` Baolin Wang

Linux-RTC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rtc/0 linux-rtc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rtc linux-rtc/ https://lore.kernel.org/linux-rtc \
		linux-rtc@vger.kernel.org
	public-inbox-index linux-rtc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rtc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git