Skip to contentSkip to conversation

rtc: rtc-88pm80x: use devm_rtc_device_register()

PATCH In review Jingoo Han 2 participants 31 messages Mar 6, 2013

Subsystems (8)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH v2 1/30 rtc: rtc-88pm80x: use devm_rtc_device_register()

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-88pm80x.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/rtc/rtc-88pm80x.c +1 -2
index 63b17eb..76f9505 100644
@@ -312,7 +312,7 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
 	}
 	rtc_tm_to_time(&tm, &ticks);
 
-	info->rtc_dev = rtc_device_register("88pm80x-rtc", &pdev->dev,
+	info->rtc_dev = devm_rtc_device_register(&pdev->dev, "88pm80x-rtc",
 					    &pm80x_rtc_ops, THIS_MODULE);
 	if (IS_ERR(info->rtc_dev)) {
 		ret = PTR_ERR(info->rtc_dev);
@@ -346,7 +346,6 @@ static int pm80x_rtc_remove(struct platform_device *pdev)
 {
 	struct pm80x_rtc_info *info = platform_get_drvdata(pdev);
 	platform_set_drvdata(pdev, NULL);
-	rtc_device_unregister(info->rtc_dev);
 	pm80x_free_irq(info->chip, info->irq, info);
 	return 0;
 }
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH v2 2/30 rtc: rtc-coh90133: use devm_rtc_device_register()

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-coh901331.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/rtc/rtc-coh901331.c +2 -3
index 2d28ec1a..78393a2 100644
@@ -155,7 +155,6 @@ static int __exit coh901331_remove(struct platform_device *pdev)
 	struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev);
 
 	if (rtap) {
-		rtc_device_unregister(rtap->rtc);
 		clk_unprepare(rtap->clk);
 		platform_set_drvdata(pdev, NULL);
 	}
@@ -211,8 +210,8 @@ static int __init coh901331_probe(struct platform_device *pdev)
 	clk_disable(rtap->clk);
 
 	platform_set_drvdata(pdev, rtap);
-	rtap->rtc = rtc_device_register("coh901331", &pdev->dev, &coh901331_ops,
-					 THIS_MODULE);
+	rtap->rtc = devm_rtc_device_register(&pdev->dev, "coh901331",
+					&coh901331_ops, THIS_MODULE);
 	if (IS_ERR(rtap->rtc)) {
 		ret = PTR_ERR(rtap->rtc);
 		goto out_no_rtc;
Signature · 1 line
1.7.2.5
author
#2 lore raw

PATCH v2 3/30 rtc: rtc-da9052: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-da9052.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/rtc/rtc-da9052.c +1 -4
index 0dde688..c4d12d9 100644
@@ -249,7 +249,7 @@ static int da9052_rtc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				       &da9052_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc->rtc))
 		return PTR_ERR(rtc->rtc);
@@ -259,9 +259,6 @@ static int da9052_rtc_probe(struct platform_device *pdev)
 
 static int da9052_rtc_remove(struct platform_device *pdev)
 {
-	struct da9052_rtc *rtc = pdev->dev.platform_data;
-
-	rtc_device_unregister(rtc->rtc);
 	platform_set_drvdata(pdev, NULL);
 
 	return 0;
Signature · 1 line
1.7.2.5
author
#3 lore raw

PATCH v2 4/30 rtc: rtc-da9055: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-da9055.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/rtc/rtc-da9055.c +1 -4
index 8f0dcfe..73858ca 100644
@@ -294,7 +294,7 @@ static int da9055_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 					&da9055_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc->rtc)) {
 		ret = PTR_ERR(rtc->rtc);
@@ -317,9 +317,6 @@ err_rtc:
 
 static int da9055_rtc_remove(struct platform_device *pdev)
 {
-	struct da9055_rtc *rtc = pdev->dev.platform_data;
-
-	rtc_device_unregister(rtc->rtc);
 	platform_set_drvdata(pdev, NULL);
 
 	return 0;
Signature · 1 line
1.7.2.5
author
#4 lore raw

PATCH v2 5/30 rtc: rtc-davinci: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-davinci.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/rtc/rtc-davinci.c +2 -6
index db877e0..4e8d2a7 100644
@@ -523,7 +523,7 @@ static int __init davinci_rtc_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, davinci_rtc);
 
-	davinci_rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	davinci_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				    &davinci_rtc_ops, THIS_MODULE);
 	if (IS_ERR(davinci_rtc->rtc)) {
 		ret = PTR_ERR(davinci_rtc->rtc);
@@ -543,7 +543,7 @@ static int __init davinci_rtc_probe(struct platform_device *pdev)
 			  0, "davinci_rtc", davinci_rtc);
 	if (ret < 0) {
 		dev_err(dev, "unable to register davinci RTC interrupt\n");
-		goto fail2;
+		goto fail1;
 	}
 
 	/* Enable interrupts */
@@ -557,8 +557,6 @@ static int __init davinci_rtc_probe(struct platform_device *pdev)
 
 	return 0;
 
-fail2:
-	rtc_device_unregister(davinci_rtc->rtc);
 fail1:
 	platform_set_drvdata(pdev, NULL);
 	return ret;
@@ -572,8 +570,6 @@ static int __exit davinci_rtc_remove(struct platform_device *pdev)
 
 	rtcif_write(davinci_rtc, 0, PRTCIF_INTEN);
 
-	rtc_device_unregister(davinci_rtc->rtc);
-
 	platform_set_drvdata(pdev, NULL);
 
 	return 0;
Signature · 1 line
1.7.2.5
author
#5 lore raw

PATCH v2 6/30 rtc: rtc-ds1511: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-ds1511.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
drivers/rtc/rtc-ds1511.c +3 -5
index 6a3fcfe..6ce8a99 100644
@@ -538,15 +538,14 @@ static int ds1511_rtc_probe(struct platform_device *pdev)
 		}
 	}
 
-	rtc = rtc_device_register(pdev->name, &pdev->dev, &ds1511_rtc_ops,
-		THIS_MODULE);
+	rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &ds1511_rtc_ops,
+					THIS_MODULE);
 	if (IS_ERR(rtc))
 		return PTR_ERR(rtc);
 	pdata->rtc = rtc;
 
 	ret = sysfs_create_bin_file(&pdev->dev.kobj, &ds1511_nvram_attr);
-	if (ret)
-		rtc_device_unregister(pdata->rtc);
+
 	return ret;
 }
 
@@ -555,7 +554,6 @@ static int ds1511_rtc_remove(struct platform_device *pdev)
 	struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
 
 	sysfs_remove_bin_file(&pdev->dev.kobj, &ds1511_nvram_attr);
-	rtc_device_unregister(pdata->rtc);
 	if (pdata->irq > 0) {
 		/*
 		 * disable the alarm interrupt
Signature · 1 line
1.7.2.5
author
#6 lore raw

PATCH v2 7/30 rtc: rtc-ds1553: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-ds1553.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/rtc/rtc-ds1553.c +2 -4
index 25ce062..8c6c952 100644
@@ -326,15 +326,14 @@ static int ds1553_rtc_probe(struct platform_device *pdev)
 		}
 	}
 
-	rtc = rtc_device_register(pdev->name, &pdev->dev,
+	rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				  &ds1553_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc))
 		return PTR_ERR(rtc);
 	pdata->rtc = rtc;
 
 	ret = sysfs_create_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr);
-	if (ret)
-		rtc_device_unregister(rtc);
+
 	return ret;
 }
 
@@ -343,7 +342,6 @@ static int ds1553_rtc_remove(struct platform_device *pdev)
 	struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
 
 	sysfs_remove_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr);
-	rtc_device_unregister(pdata->rtc);
 	if (pdata->irq > 0)
 		writeb(0, pdata->ioaddr + RTC_INTERRUPTS);
 	return 0;
Signature · 1 line
1.7.2.5
author
#7 lore raw

PATCH v2 8/30 rtc: rtc-ds1742: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-ds1742.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/rtc/rtc-ds1742.c +2 -6
index 609c870..eccdc62 100644
@@ -208,17 +208,14 @@ static int ds1742_rtc_probe(struct platform_device *pdev)
 
 	pdata->last_jiffies = jiffies;
 	platform_set_drvdata(pdev, pdata);
-	rtc = rtc_device_register(pdev->name, &pdev->dev,
+	rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				  &ds1742_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc))
 		return PTR_ERR(rtc);
 	pdata->rtc = rtc;
 
 	ret = sysfs_create_bin_file(&pdev->dev.kobj, &pdata->nvram_attr);
-	if (ret) {
-		dev_err(&pdev->dev, "creating nvram file in sysfs failed\n");
-		rtc_device_unregister(rtc);
-	}
+
 	return ret;
 }
 
@@ -227,7 +224,6 @@ static int ds1742_rtc_remove(struct platform_device *pdev)
 	struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
 
 	sysfs_remove_bin_file(&pdev->dev.kobj, &pdata->nvram_attr);
-	rtc_device_unregister(pdata->rtc);
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#8 lore raw

PATCH v2 9/30 rtc: rtc-ep93xx: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-ep93xx.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
drivers/rtc/rtc-ep93xx.c +3 -8
index 1a4e5e4..5807b77 100644
@@ -153,8 +153,8 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
 	pdev->dev.platform_data = ep93xx_rtc;
 	platform_set_drvdata(pdev, ep93xx_rtc);
 
-	ep93xx_rtc->rtc = rtc_device_register(pdev->name,
-				&pdev->dev, &ep93xx_rtc_ops, THIS_MODULE);
+	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;
@@ -162,12 +162,10 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
 
 	err = sysfs_create_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
 	if (err)
-		goto fail;
+		goto exit;
 
 	return 0;
 
-fail:
-	rtc_device_unregister(ep93xx_rtc->rtc);
 exit:
 	platform_set_drvdata(pdev, NULL);
 	pdev->dev.platform_data = NULL;
@@ -176,11 +174,8 @@ exit:
 
 static int ep93xx_rtc_remove(struct platform_device *pdev)
 {
-	struct ep93xx_rtc *ep93xx_rtc = platform_get_drvdata(pdev);
-
 	sysfs_remove_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
 	platform_set_drvdata(pdev, NULL);
-	rtc_device_unregister(ep93xx_rtc->rtc);
 	pdev->dev.platform_data = NULL;
 
 	return 0;
Signature · 1 line
1.7.2.5
author
#9 lore raw

PATCH v2 10/30 rtc: rtc-imxdi: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-imxdi.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/rtc/rtc-imxdi.c +1 -3
index 73cf81c..33914e2 100644
@@ -464,7 +464,7 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
 	}
 
 	platform_set_drvdata(pdev, imxdi);
-	imxdi->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	imxdi->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				  &dryice_rtc_ops, THIS_MODULE);
 	if (IS_ERR(imxdi->rtc)) {
 		rc = PTR_ERR(imxdi->rtc);
@@ -488,8 +488,6 @@ static int __exit dryice_rtc_remove(struct platform_device *pdev)
 	/* mask all interrupts */
 	__raw_writel(0, imxdi->ioaddr + DIER);
 
-	rtc_device_unregister(imxdi->rtc);
-
 	clk_disable_unprepare(imxdi->clk);
 
 	return 0;
Signature · 1 line
1.7.2.5
author
#10 lore raw

PATCH v2 11/30 rtc: rtc-lp8788: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-lp8788.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/rtc/rtc-lp8788.c +1 -4
index 9a46312..9853ac1 100644
@@ -299,7 +299,7 @@ static int lp8788_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(dev, 1);
 
-	rtc->rdev = rtc_device_register("lp8788_rtc", dev,
+	rtc->rdev = devm_rtc_device_register(dev, "lp8788_rtc",
 					&lp8788_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc->rdev)) {
 		dev_err(dev, "can not register rtc device\n");
@@ -314,9 +314,6 @@ static int lp8788_rtc_probe(struct platform_device *pdev)
 
 static int lp8788_rtc_remove(struct platform_device *pdev)
 {
-	struct lp8788_rtc *rtc = platform_get_drvdata(pdev);
-
-	rtc_device_unregister(rtc->rdev);
 	platform_set_drvdata(pdev, NULL);
 
 	return 0;
Signature · 1 line
1.7.2.5
author
#11 lore raw

PATCH v2 12/30 rtc: rtc-lpc32xx: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-lpc32xx.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/rtc/rtc-lpc32xx.c +2 -3
index 40a5983..787550d 100644
@@ -273,8 +273,8 @@ static int lpc32xx_rtc_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, rtc);
 
-	rtc->rtc = rtc_device_register(RTC_NAME, &pdev->dev, &lpc32xx_rtc_ops,
-		THIS_MODULE);
+	rtc->rtc = devm_rtc_device_register(&pdev->dev, RTC_NAME,
+					&lpc32xx_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc->rtc)) {
 		dev_err(&pdev->dev, "Can't get RTC\n");
 		platform_set_drvdata(pdev, NULL);
@@ -307,7 +307,6 @@ static int lpc32xx_rtc_remove(struct platform_device *pdev)
 		device_init_wakeup(&pdev->dev, 0);
 
 	platform_set_drvdata(pdev, NULL);
-	rtc_device_unregister(rtc->rtc);
 
 	return 0;
 }
Signature · 1 line
1.7.2.5
author
#12 lore raw

PATCH v2 13/30 rtc: rtc-max77686: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler. Also, this patch uses devm_request_threaded_irq().

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-max77686.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)
drivers/rtc/rtc-max77686.c +4 -11
index df66bab..5a12b32 100644
@@ -538,8 +538,8 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	info->rtc_dev = rtc_device_register("max77686-rtc", &pdev->dev,
-			&max77686_rtc_ops, THIS_MODULE);
+	info->rtc_dev = devm_rtc_device_register(&pdev->dev, "max77686-rtc",
+					&max77686_rtc_ops, THIS_MODULE);
 
 	if (IS_ERR(info->rtc_dev)) {
 		dev_info(&pdev->dev, "%s: fail\n", __func__);
@@ -555,8 +555,8 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 		goto err_rtc;
 	info->virq = virq;
 
-	ret = request_threaded_irq(virq, NULL, max77686_rtc_alarm_irq, 0,
-			"rtc-alarm0", info);
+	ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
+				max77686_rtc_alarm_irq, 0, "rtc-alarm0", info);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
 			info->virq, ret);
@@ -569,13 +569,6 @@ err_rtc:
 
 static int max77686_rtc_remove(struct platform_device *pdev)
 {
-	struct max77686_rtc_info *info = platform_get_drvdata(pdev);
-
-	if (info) {
-		free_irq(info->virq, info);
-		rtc_device_unregister(info->rtc_dev);
-	}
-
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#13 lore raw

PATCH v2 14/30 rtc: rtc-max8907: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-max8907.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/rtc/rtc-max8907.c +1 -6
index 31ca8fa..9d62cdb 100644
@@ -190,7 +190,7 @@ static int max8907_rtc_probe(struct platform_device *pdev)
 	rtc->max8907 = max8907;
 	rtc->regmap = max8907->regmap_rtc;
 
-	rtc->rtc_dev = rtc_device_register("max8907-rtc", &pdev->dev,
+	rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8907-rtc",
 					&max8907_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc->rtc_dev)) {
 		ret = PTR_ERR(rtc->rtc_dev);
@@ -217,16 +217,11 @@ static int max8907_rtc_probe(struct platform_device *pdev)
 	return 0;
 
 err_unregister:
-	rtc_device_unregister(rtc->rtc_dev);
 	return ret;
 }
 
 static int max8907_rtc_remove(struct platform_device *pdev)
 {
-	struct max8907_rtc *rtc = platform_get_drvdata(pdev);
-
-	rtc_device_unregister(rtc->rtc_dev);
-
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#14 lore raw

PATCH v2 15/30 rtc: rtc-max8997: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-max8997.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
drivers/rtc/rtc-max8997.c +2 -8
index 00e505b..d12acc4 100644
@@ -479,8 +479,8 @@ static int max8997_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	info->rtc_dev = rtc_device_register("max8997-rtc", &pdev->dev,
-			&max8997_rtc_ops, THIS_MODULE);
+	info->rtc_dev = devm_rtc_device_register(&pdev->dev, "max8997-rtc",
+					&max8997_rtc_ops, THIS_MODULE);
 
 	if (IS_ERR(info->rtc_dev)) {
 		ret = PTR_ERR(info->rtc_dev);
@@ -507,17 +507,11 @@ static int max8997_rtc_probe(struct platform_device *pdev)
 	return ret;
 
 err_out:
-	rtc_device_unregister(info->rtc_dev);
 	return ret;
 }
 
 static int max8997_rtc_remove(struct platform_device *pdev)
 {
-	struct max8997_rtc_info *info = platform_get_drvdata(pdev);
-
-	if (info)
-		rtc_device_unregister(info->rtc_dev);
-
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#15 lore raw

PATCH v2 16/30 rtc: rtc-mv: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-mv.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/rtc/rtc-mv.c +4 -4
index 59d1671..cb2b76a 100644
@@ -262,12 +262,13 @@ static int __init mv_rtc_probe(struct platform_device *pdev)
 
 	if (pdata->irq >= 0) {
 		device_init_wakeup(&pdev->dev, 1);
-		pdata->rtc = rtc_device_register(pdev->name, &pdev->dev,
+		pdata->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 						 &mv_rtc_alarm_ops,
 						 THIS_MODULE);
-	} else
-		pdata->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	} else {
+		pdata->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 						 &mv_rtc_ops, THIS_MODULE);
+	}
 	if (IS_ERR(pdata->rtc))
 		return PTR_ERR(pdata->rtc);
 
@@ -291,7 +292,6 @@ static int __exit mv_rtc_remove(struct platform_device *pdev)
 	if (pdata->irq >= 0)
 		device_init_wakeup(&pdev->dev, 0);
 
-	rtc_device_unregister(pdata->rtc);
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#16 lore raw

PATCH v2 17/30 rtc: rtc-mxc: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-mxc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/rtc/rtc-mxc.c +1 -3
index 1c3ef72..13380ca 100644
@@ -439,7 +439,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
 	if (pdata->irq >=0)
 		device_init_wakeup(&pdev->dev, 1);
 
-	rtc = rtc_device_register(pdev->name, &pdev->dev, &mxc_rtc_ops,
+	rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &mxc_rtc_ops,
 				  THIS_MODULE);
 	if (IS_ERR(rtc)) {
 		ret = PTR_ERR(rtc);
@@ -464,8 +464,6 @@ static int mxc_rtc_remove(struct platform_device *pdev)
 {
 	struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
 
-	rtc_device_unregister(pdata->rtc);
-
 	clk_disable_unprepare(pdata->clk);
 	platform_set_drvdata(pdev, NULL);
 
Signature · 1 line
1.7.2.5
author
#17 lore raw

PATCH v2 18/30 rtc: rtc-palmas: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-palmas.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/rtc/rtc-palmas.c +1 -5
index df9359c..bbc3b9ef 100644
@@ -264,7 +264,7 @@ static int palmas_rtc_probe(struct platform_device *pdev)
 
 	palmas_rtc->irq = platform_get_irq(pdev, 0);
 
-	palmas_rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				&palmas_rtc_ops, THIS_MODULE);
 	if (IS_ERR(palmas_rtc->rtc)) {
 		ret = PTR_ERR(palmas_rtc->rtc);
@@ -279,7 +279,6 @@ static int palmas_rtc_probe(struct platform_device *pdev)
 			dev_name(&pdev->dev), palmas_rtc);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "IRQ request failed, err = %d\n", ret);
-		rtc_device_unregister(palmas_rtc->rtc);
 		return ret;
 	}
 
@@ -289,10 +288,7 @@ static int palmas_rtc_probe(struct platform_device *pdev)
 
 static int palmas_rtc_remove(struct platform_device *pdev)
 {
-	struct palmas_rtc *palmas_rtc = platform_get_drvdata(pdev);
-
 	palmas_rtc_alarm_irq_enable(&pdev->dev, 0);
-	rtc_device_unregister(palmas_rtc->rtc);
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#18 lore raw

PATCH v2 19/30 rtc: rtc-pcf8523: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-pcf8523.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/rtc/rtc-pcf8523.c +1 -5
index 889e316..305c951 100644
@@ -307,7 +307,7 @@ static int pcf8523_probe(struct i2c_client *client,
 	if (err < 0)
 		return err;
 
-	pcf->rtc = rtc_device_register(DRIVER_NAME, &client->dev,
+	pcf->rtc = devm_rtc_device_register(&client->dev, DRIVER_NAME,
 				       &pcf8523_rtc_ops, THIS_MODULE);
 	if (IS_ERR(pcf->rtc))
 		return PTR_ERR(pcf->rtc);
@@ -319,10 +319,6 @@ static int pcf8523_probe(struct i2c_client *client,
 
 static int pcf8523_remove(struct i2c_client *client)
 {
-	struct pcf8523 *pcf = i2c_get_clientdata(client);
-
-	rtc_device_unregister(pcf->rtc);
-
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#19 lore raw

PATCH v2 20/30 rtc: rtc-s3c: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-s3c.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/rtc/rtc-s3c.c +1 -5
index fb994e9..7dcf719 100644
@@ -423,10 +423,7 @@ static void s3c_rtc_enable(struct platform_device *pdev, int en)
 
 static int s3c_rtc_remove(struct platform_device *dev)
 {
-	struct rtc_device *rtc = platform_get_drvdata(dev);
-
 	platform_set_drvdata(dev, NULL);
-	rtc_device_unregister(rtc);
 
 	s3c_rtc_setaie(&dev->dev, 0);
 
@@ -511,7 +508,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 
 	/* register RTC and exit */
 
-	rtc = rtc_device_register("s3c", &pdev->dev, &s3c_rtcops,
+	rtc = devm_rtc_device_register(&pdev->dev, "s3c", &s3c_rtcops,
 				  THIS_MODULE);
 
 	if (IS_ERR(rtc)) {
@@ -574,7 +571,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 
  err_alarm_irq:
 	platform_set_drvdata(pdev, NULL);
-	rtc_device_unregister(rtc);
 
  err_nortc:
 	s3c_rtc_enable(pdev, 0);
Signature · 1 line
1.7.2.5
author
#20 lore raw

PATCH v2 21/30 rtc: rtc-snvs: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-snvs.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/rtc/rtc-snvs.c +1 -5
index f7d9070..b04f09a 100644
@@ -283,7 +283,7 @@ static int snvs_rtc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	data->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	data->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 					&snvs_rtc_ops, THIS_MODULE);
 	if (IS_ERR(data->rtc)) {
 		ret = PTR_ERR(data->rtc);
@@ -296,10 +296,6 @@ static int snvs_rtc_probe(struct platform_device *pdev)
 
 static int snvs_rtc_remove(struct platform_device *pdev)
 {
-	struct snvs_rtc_data *data = platform_get_drvdata(pdev);
-
-	rtc_device_unregister(data->rtc);
-
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#21 lore raw

PATCH v2 22/30 rtc: rtc-spear: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-spear.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/rtc/rtc-spear.c +2 -3
index a18c319..db3ef61 100644
@@ -400,8 +400,8 @@ static int spear_rtc_probe(struct platform_device *pdev)
 	spin_lock_init(&config->lock);
 	platform_set_drvdata(pdev, config);
 
-	config->rtc = rtc_device_register(pdev->name, &pdev->dev,
-			&spear_rtc_ops, THIS_MODULE);
+	config->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
+					&spear_rtc_ops, THIS_MODULE);
 	if (IS_ERR(config->rtc)) {
 		dev_err(&pdev->dev, "can't register RTC device, err %ld\n",
 				PTR_ERR(config->rtc));
@@ -427,7 +427,6 @@ static int spear_rtc_remove(struct platform_device *pdev)
 {
 	struct spear_rtc_config *config = platform_get_drvdata(pdev);
 
-	rtc_device_unregister(config->rtc);
 	spear_rtc_disable_interrupt(config);
 	clk_disable_unprepare(config->clk);
 	device_init_wakeup(&pdev->dev, 0);
Signature · 1 line
1.7.2.5
Acked-by on v2 22/30
#22 lore raw

Re: [PATCH V2 22/30] rtc: rtc-spear: use devm_rtc_device_register()

Quoted 10 lines · Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-spear.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
author
#23 lore raw

PATCH v2 23/30 rtc: rtc-stk17ta8: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-stk17ta8.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/rtc/rtc-stk17ta8.c +2 -4
index 7e4a6f6..af5e97e 100644
@@ -336,14 +336,13 @@ static int stk17ta8_rtc_probe(struct platform_device *pdev)
 		}
 	}
 
-	pdata->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	pdata->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				  &stk17ta8_rtc_ops, THIS_MODULE);
 	if (IS_ERR(pdata->rtc))
 		return PTR_ERR(pdata->rtc);
 
 	ret = sysfs_create_bin_file(&pdev->dev.kobj, &stk17ta8_nvram_attr);
-	if (ret)
-		rtc_device_unregister(pdata->rtc);
+
 	return ret;
 }
 
@@ -352,7 +351,6 @@ static int stk17ta8_rtc_remove(struct platform_device *pdev)
 	struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
 
 	sysfs_remove_bin_file(&pdev->dev.kobj, &stk17ta8_nvram_attr);
-	rtc_device_unregister(pdata->rtc);
 	if (pdata->irq > 0)
 		writeb(0, pdata->ioaddr + RTC_INTERRUPTS);
 	return 0;
Signature · 1 line
1.7.2.5
author
#24 lore raw

PATCH v2 24/30 rtc: rtc-tegra: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-tegra.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
drivers/rtc/rtc-tegra.c +2 -8
index 0020bab..8dbf2dc 100644
@@ -348,8 +348,8 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	info->rtc_dev = rtc_device_register(
-		pdev->name, &pdev->dev, &tegra_rtc_ops, THIS_MODULE);
+	info->rtc_dev = devm_rtc_device_register(
+		&pdev->dev, pdev->name, &tegra_rtc_ops, THIS_MODULE);
 	if (IS_ERR(info->rtc_dev)) {
 		ret = PTR_ERR(info->rtc_dev);
 		info->rtc_dev = NULL;
@@ -374,17 +374,11 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
 	return 0;
 
 err_dev_unreg:
-	rtc_device_unregister(info->rtc_dev);
-
 	return ret;
 }
 
 static int __exit tegra_rtc_remove(struct platform_device *pdev)
 {
-	struct tegra_rtc_info *info = platform_get_drvdata(pdev);
-
-	rtc_device_unregister(info->rtc_dev);
-
 	platform_set_drvdata(pdev, NULL);
 
 	return 0;
Signature · 1 line
1.7.2.5
author
#25 lore raw

PATCH v2 25/30 rtc: rtc-tps6586x: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-tps6586x.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/rtc/rtc-tps6586x.c +1 -3
index aab4e8c..b6aab9f 100644
@@ -274,7 +274,7 @@ static int tps6586x_rtc_probe(struct platform_device *pdev)
 	}
 
 	platform_set_drvdata(pdev, rtc);
-	rtc->rtc = rtc_device_register(dev_name(&pdev->dev), &pdev->dev,
+	rtc->rtc = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev),
 				       &tps6586x_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc->rtc)) {
 		ret = PTR_ERR(rtc->rtc);
@@ -306,12 +306,10 @@ fail_rtc_register:
 
 static int tps6586x_rtc_remove(struct platform_device *pdev)
 {
-	struct tps6586x_rtc *rtc = platform_get_drvdata(pdev);
 	struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
 
 	tps6586x_update(tps_dev, RTC_CTRL, 0,
 		RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
-	rtc_device_unregister(rtc->rtc);
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#26 lore raw

PATCH v2 26/30 rtc: rtc-tps65910: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-tps65910.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/rtc/rtc-tps65910.c +1 -5
index 8bd8115..ef5d199 100644
@@ -276,7 +276,7 @@ static int tps65910_rtc_probe(struct platform_device *pdev)
 	tps_rtc->irq = irq;
 	device_set_wakeup_capable(&pdev->dev, 1);
 
-	tps_rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	tps_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 		&tps65910_rtc_ops, THIS_MODULE);
 	if (IS_ERR(tps_rtc->rtc)) {
 		ret = PTR_ERR(tps_rtc->rtc);
@@ -295,12 +295,8 @@ static int tps65910_rtc_probe(struct platform_device *pdev)
  */
 static int tps65910_rtc_remove(struct platform_device *pdev)
 {
-	/* leave rtc running, but disable irqs */
-	struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev);
-
 	tps65910_rtc_alarm_irq_enable(&pdev->dev, 0);
 
-	rtc_device_unregister(tps_rtc->rtc);
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#27 lore raw

PATCH v2 27/30 rtc: rtc-tps80031: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-tps80031.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/rtc/rtc-tps80031.c +1 -5
index 9aaf8aa..dc62d5f 100644
@@ -277,7 +277,7 @@ static int tps80031_rtc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 			       &tps80031_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc->rtc)) {
 		ret = PTR_ERR(rtc->rtc);
@@ -292,7 +292,6 @@ static int tps80031_rtc_probe(struct platform_device *pdev)
 	if (ret < 0) {
 		dev_err(&pdev->dev, "request IRQ:%d failed, err = %d\n",
 			 rtc->irq, ret);
-		rtc_device_unregister(rtc->rtc);
 		return ret;
 	}
 	device_set_wakeup_capable(&pdev->dev, 1);
@@ -301,9 +300,6 @@ static int tps80031_rtc_probe(struct platform_device *pdev)
 
 static int tps80031_rtc_remove(struct platform_device *pdev)
 {
-	struct tps80031_rtc *rtc = platform_get_drvdata(pdev);
-
-	rtc_device_unregister(rtc->rtc);
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
author
#28 lore raw

PATCH v2 28/30 rtc: rtc-tx4939: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-tx4939.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/rtc/rtc-tx4939.c +2 -4
index a12bfac..cf28f68 100644
@@ -268,14 +268,13 @@ static int __init tx4939_rtc_probe(struct platform_device *pdev)
 	if (devm_request_irq(&pdev->dev, irq, tx4939_rtc_interrupt,
 			     0, pdev->name, &pdev->dev) < 0)
 		return -EBUSY;
-	rtc = rtc_device_register(pdev->name, &pdev->dev,
+	rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 				  &tx4939_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc))
 		return PTR_ERR(rtc);
 	pdata->rtc = rtc;
 	ret = sysfs_create_bin_file(&pdev->dev.kobj, &tx4939_rtc_nvram_attr);
-	if (ret)
-		rtc_device_unregister(rtc);
+
 	return ret;
 }
 
@@ -284,7 +283,6 @@ static int __exit tx4939_rtc_remove(struct platform_device *pdev)
 	struct tx4939rtc_plat_data *pdata = platform_get_drvdata(pdev);
 
 	sysfs_remove_bin_file(&pdev->dev.kobj, &tx4939_rtc_nvram_attr);
-	rtc_device_unregister(pdata->rtc);
 	spin_lock_irq(&pdata->lock);
 	tx4939_rtc_cmd(pdata->rtcreg, TX4939_RTCCTL_COMMAND_NOP);
 	spin_unlock_irq(&pdata->lock);
Signature · 1 line
1.7.2.5
author
#29 lore raw

PATCH v2 29/30 rtc: rtc-vt8500: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-vt8500.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/rtc/rtc-vt8500.c +2 -6
index a000bc0..d89efee 100644
@@ -252,7 +252,7 @@ static int vt8500_rtc_probe(struct platform_device *pdev)
 	writel(VT8500_RTC_CR_ENABLE,
 	       vt8500_rtc->regbase + VT8500_RTC_CR);
 
-	vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev,
+	vt8500_rtc->rtc = devm_rtc_device_register(&pdev->dev, "vt8500-rtc",
 					      &vt8500_rtc_ops, THIS_MODULE);
 	if (IS_ERR(vt8500_rtc->rtc)) {
 		ret = PTR_ERR(vt8500_rtc->rtc);
@@ -266,13 +266,11 @@ static int vt8500_rtc_probe(struct platform_device *pdev)
 	if (ret < 0) {
 		dev_err(&pdev->dev, "can't get irq %i, err %d\n",
 			vt8500_rtc->irq_alarm, ret);
-		goto err_unreg;
+		goto err_return;
 	}
 
 	return 0;
 
-err_unreg:
-	rtc_device_unregister(vt8500_rtc->rtc);
 err_return:
 	return ret;
 }
@@ -281,8 +279,6 @@ static int vt8500_rtc_remove(struct platform_device *pdev)
 {
 	struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev);
 
-	rtc_device_unregister(vt8500_rtc->rtc);
-
 	/* Disable alarm matching */
 	writel(0, vt8500_rtc->regbase + VT8500_RTC_IS);
 
Signature · 1 line
1.7.2.5
author
#30 lore raw

PATCH v2 30/30 rtc: rtc-wm831x: use devm_rtc_device_register()

In reply to Jingoo Han

devm_rtc_device_register() is device managed and makes cleanup paths simpler.

---
Changes since v1:
- used 'struct device *dev' as the first argument

 drivers/rtc/rtc-wm831x.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
drivers/rtc/rtc-wm831x.c +1 -5
index 2f0ac7b..8d65b94 100644
@@ -436,7 +436,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	wm831x_rtc->rtc = rtc_device_register("wm831x", &pdev->dev,
+	wm831x_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm831x",
 					      &wm831x_rtc_ops, THIS_MODULE);
 	if (IS_ERR(wm831x_rtc->rtc)) {
 		ret = PTR_ERR(wm831x_rtc->rtc);
@@ -462,10 +462,6 @@ err:
 
 static int wm831x_rtc_remove(struct platform_device *pdev)
 {
-	struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev);
-
-	rtc_device_unregister(wm831x_rtc->rtc);
-
 	return 0;
 }
 
Signature · 1 line
1.7.2.5