linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] rtc: ep93xx: stop setting platform_data
@ 2019-04-19  7:59 Alexandre Belloni
  2019-04-19  7:59 ` [PATCH 2/8] rtc: ep93xx: convert to devm_rtc_allocate_device Alexandre Belloni
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Alexandre Belloni @ 2019-04-19  7:59 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

Since commit 28dc5f803899 ("drivers/rtc/rtc-ep93xx.c: use
dev_get_platdata()"), platform_data is not used directly, it is not
necessary to set it anymore.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-ep93xx.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 1932a4f861d1..db04ac445c69 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -28,10 +28,6 @@
 #define  EP93XX_RTC_SWCOMP_INT_MASK	 0x0000ffff
 #define  EP93XX_RTC_SWCOMP_INT_SHIFT	 0
 
-/*
- * struct device dev.platform_data is used to store our private data
- * because struct rtc_device does not have a variable to hold it.
- */
 struct ep93xx_rtc {
 	void __iomem	*mmio_base;
 	struct rtc_device *rtc;
@@ -140,31 +136,23 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
 	if (IS_ERR(ep93xx_rtc->mmio_base))
 		return PTR_ERR(ep93xx_rtc->mmio_base);
 
-	pdev->dev.platform_data = ep93xx_rtc;
 	platform_set_drvdata(pdev, ep93xx_rtc);
 
 	ep93xx_rtc->rtc = devm_rtc_device_register(&pdev->dev,
 				pdev->name, &ep93xx_rtc_ops, THIS_MODULE);
-	if (IS_ERR(ep93xx_rtc->rtc)) {
-		err = PTR_ERR(ep93xx_rtc->rtc);
-		goto exit;
-	}
+	if (IS_ERR(ep93xx_rtc->rtc))
+		return PTR_ERR(ep93xx_rtc->rtc);
 
 	err = sysfs_create_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
 	if (err)
-		goto exit;
+		return err;
 
 	return 0;
-
-exit:
-	pdev->dev.platform_data = NULL;
-	return err;
 }
 
 static int ep93xx_rtc_remove(struct platform_device *pdev)
 {
 	sysfs_remove_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
-	pdev->dev.platform_data = NULL;
 
 	return 0;
 }
-- 
2.20.1


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

end of thread, other threads:[~2019-04-19 20:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19  7:59 [PATCH 1/8] rtc: ep93xx: stop setting platform_data Alexandre Belloni
2019-04-19  7:59 ` [PATCH 2/8] rtc: ep93xx: convert to devm_rtc_allocate_device Alexandre Belloni
2019-04-19  8:00 ` [PATCH 3/8] rtc: ep93xx: use rtc_add_group Alexandre Belloni
2019-04-19  8:00 ` [PATCH 4/8] rtc: ep93xx: set range Alexandre Belloni
2019-04-19  8:00 ` [PATCH 5/8] rtc: ep93xx: switch to rtc_time64_to_tm Alexandre Belloni
2019-04-19  8:00 ` [PATCH 6/8] rtc: ep93xx: use .set_time Alexandre Belloni
2019-04-19  8:00 ` [PATCH 7/8] rtc: ep93xx: convert to SPDX identifier Alexandre Belloni
2019-04-19  8:00 ` [PATCH 8/8] rtc: ep93xx: fix checkpatch issues Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).