Skip to content

Commit b809d19

Browse files
rtc: ep93xx: stop setting platform_data
Since commit 28dc5f8 ("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>
1 parent 9eec31f commit b809d19

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

drivers/rtc/rtc-ep93xx.c

+3-15
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
#define EP93XX_RTC_SWCOMP_INT_MASK 0x0000ffff
2929
#define EP93XX_RTC_SWCOMP_INT_SHIFT 0
3030

31-
/*
32-
* struct device dev.platform_data is used to store our private data
33-
* because struct rtc_device does not have a variable to hold it.
34-
*/
3531
struct ep93xx_rtc {
3632
void __iomem *mmio_base;
3733
struct rtc_device *rtc;
@@ -140,31 +136,23 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
140136
if (IS_ERR(ep93xx_rtc->mmio_base))
141137
return PTR_ERR(ep93xx_rtc->mmio_base);
142138

143-
pdev->dev.platform_data = ep93xx_rtc;
144139
platform_set_drvdata(pdev, ep93xx_rtc);
145140

146141
ep93xx_rtc->rtc = devm_rtc_device_register(&pdev->dev,
147142
pdev->name, &ep93xx_rtc_ops, THIS_MODULE);
148-
if (IS_ERR(ep93xx_rtc->rtc)) {
149-
err = PTR_ERR(ep93xx_rtc->rtc);
150-
goto exit;
151-
}
143+
if (IS_ERR(ep93xx_rtc->rtc))
144+
return PTR_ERR(ep93xx_rtc->rtc);
152145

153146
err = sysfs_create_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
154147
if (err)
155-
goto exit;
148+
return err;
156149

157150
return 0;
158-
159-
exit:
160-
pdev->dev.platform_data = NULL;
161-
return err;
162151
}
163152

164153
static int ep93xx_rtc_remove(struct platform_device *pdev)
165154
{
166155
sysfs_remove_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
167-
pdev->dev.platform_data = NULL;
168156

169157
return 0;
170158
}

0 commit comments

Comments
 (0)