aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-tile.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-tile.c')
-rw-r--r--drivers/rtc/rtc-tile.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-tile.c b/drivers/rtc/rtc-tile.c
index 62db4841078b..249b6531f119 100644
--- a/drivers/rtc/rtc-tile.c
+++ b/drivers/rtc/rtc-tile.c
@@ -80,8 +80,8 @@ static int tile_rtc_probe(struct platform_device *dev)
80{ 80{
81 struct rtc_device *rtc; 81 struct rtc_device *rtc;
82 82
83 rtc = rtc_device_register("tile", 83 rtc = devm_rtc_device_register(&dev->dev, "tile",
84 &dev->dev, &tile_rtc_ops, THIS_MODULE); 84 &tile_rtc_ops, THIS_MODULE);
85 85
86 if (IS_ERR(rtc)) 86 if (IS_ERR(rtc))
87 return PTR_ERR(rtc); 87 return PTR_ERR(rtc);
@@ -96,11 +96,6 @@ static int tile_rtc_probe(struct platform_device *dev)
96 */ 96 */
97static int tile_rtc_remove(struct platform_device *dev) 97static int tile_rtc_remove(struct platform_device *dev)
98{ 98{
99 struct rtc_device *rtc = platform_get_drvdata(dev);
100
101 if (rtc)
102 rtc_device_unregister(rtc);
103
104 platform_set_drvdata(dev, NULL); 99 platform_set_drvdata(dev, NULL);
105 100
106 return 0; 101 return 0;