diff mbox series

[-next] rtc: ds1302: remove unnecessary spi_set_drvdata()

Message ID 20220913144905.2004924-1-yangyingliang@huawei.com
State Accepted
Headers show
Series [-next] rtc: ds1302: remove unnecessary spi_set_drvdata() | expand

Commit Message

Yang Yingliang Sept. 13, 2022, 2:49 p.m. UTC
Remove unnecessary spi_set_drvdata() in ds1302_remove(), the driver_data
will be set to NULL in device_unbind_cleanup() after calling ->remove().
After this, ds1302_remove() is an empty function, so remove it too.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/rtc/rtc-ds1302.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Alexandre Belloni Nov. 14, 2022, 6:23 p.m. UTC | #1
On Tue, 13 Sep 2022 22:49:05 +0800, Yang Yingliang wrote:
> Remove unnecessary spi_set_drvdata() in ds1302_remove(), the driver_data
> will be set to NULL in device_unbind_cleanup() after calling ->remove().
> After this, ds1302_remove() is an empty function, so remove it too.
> 
> 

Applied, thanks!

[1/1] rtc: ds1302: remove unnecessary spi_set_drvdata()
      commit: eeb9d3b39c44d3824389d0cec8eabaac995822c9

Best regards,
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
index 6d66ab5a8b17..ecc7d0307932 100644
--- a/drivers/rtc/rtc-ds1302.c
+++ b/drivers/rtc/rtc-ds1302.c
@@ -185,11 +185,6 @@  static int ds1302_probe(struct spi_device *spi)
 	return 0;
 }
 
-static void ds1302_remove(struct spi_device *spi)
-{
-	spi_set_drvdata(spi, NULL);
-}
-
 #ifdef CONFIG_OF
 static const struct of_device_id ds1302_dt_ids[] = {
 	{ .compatible = "maxim,ds1302", },
@@ -208,7 +203,6 @@  static struct spi_driver ds1302_driver = {
 	.driver.name	= "rtc-ds1302",
 	.driver.of_match_table = of_match_ptr(ds1302_dt_ids),
 	.probe		= ds1302_probe,
-	.remove		= ds1302_remove,
 	.id_table	= ds1302_spi_ids,
 };