* [PATCH V2 02/30] rtc: rtc-coh90133: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
@ 2013-03-06 7:47 ` Jingoo Han
2013-03-06 7:48 ` [PATCH V2 03/30] rtc: rtc-da9052: " Jingoo Han
` (27 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:47 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-coh901331.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c
index 2d28ec1a..78393a2 100644
--- a/drivers/rtc/rtc-coh901331.c
+++ b/drivers/rtc/rtc-coh901331.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 03/30] rtc: rtc-da9052: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
2013-03-06 7:47 ` [PATCH V2 02/30] rtc: rtc-coh90133: " Jingoo Han
@ 2013-03-06 7:48 ` Jingoo Han
2013-03-06 7:48 ` [PATCH V2 04/30] rtc: rtc-da9055: " Jingoo Han
` (26 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:48 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-da9052.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index 0dde688..c4d12d9 100644
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 04/30] rtc: rtc-da9055: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
2013-03-06 7:47 ` [PATCH V2 02/30] rtc: rtc-coh90133: " Jingoo Han
2013-03-06 7:48 ` [PATCH V2 03/30] rtc: rtc-da9052: " Jingoo Han
@ 2013-03-06 7:48 ` Jingoo Han
2013-03-06 7:49 ` [PATCH V2 05/30] rtc: rtc-davinci: " Jingoo Han
` (25 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:48 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-da9055.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-da9055.c b/drivers/rtc/rtc-da9055.c
index 8f0dcfe..73858ca 100644
--- a/drivers/rtc/rtc-da9055.c
+++ b/drivers/rtc/rtc-da9055.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 05/30] rtc: rtc-davinci: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (2 preceding siblings ...)
2013-03-06 7:48 ` [PATCH V2 04/30] rtc: rtc-da9055: " Jingoo Han
@ 2013-03-06 7:49 ` Jingoo Han
2013-03-06 7:49 ` [PATCH V2 06/30] rtc: rtc-ds1511: " Jingoo Han
` (24 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:49 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-davinci.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c
index db877e0..4e8d2a7 100644
--- a/drivers/rtc/rtc-davinci.c
+++ b/drivers/rtc/rtc-davinci.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 06/30] rtc: rtc-ds1511: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (3 preceding siblings ...)
2013-03-06 7:49 ` [PATCH V2 05/30] rtc: rtc-davinci: " Jingoo Han
@ 2013-03-06 7:49 ` Jingoo Han
2013-03-06 7:49 ` [PATCH V2 07/30] rtc: rtc-ds1553: " Jingoo Han
` (23 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:49 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-ds1511.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index 6a3fcfe..6ce8a99 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -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
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 07/30] rtc: rtc-ds1553: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (4 preceding siblings ...)
2013-03-06 7:49 ` [PATCH V2 06/30] rtc: rtc-ds1511: " Jingoo Han
@ 2013-03-06 7:49 ` Jingoo Han
2013-03-06 7:50 ` [PATCH V2 08/30] rtc: rtc-ds1742: " Jingoo Han
` (22 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:49 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-ds1553.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 25ce062..8c6c952 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 08/30] rtc: rtc-ds1742: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (5 preceding siblings ...)
2013-03-06 7:49 ` [PATCH V2 07/30] rtc: rtc-ds1553: " Jingoo Han
@ 2013-03-06 7:50 ` Jingoo Han
2013-03-06 7:50 ` [PATCH V2 09/30] rtc: rtc-ep93xx: " Jingoo Han
` (21 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:50 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-ds1742.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 609c870..eccdc62 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 09/30] rtc: rtc-ep93xx: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (6 preceding siblings ...)
2013-03-06 7:50 ` [PATCH V2 08/30] rtc: rtc-ds1742: " Jingoo Han
@ 2013-03-06 7:50 ` Jingoo Han
2013-03-06 7:50 ` [PATCH V2 10/30] rtc: rtc-imxdi: " Jingoo Han
` (20 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:50 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-ep93xx.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 1a4e5e4..5807b77 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 10/30] rtc: rtc-imxdi: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (7 preceding siblings ...)
2013-03-06 7:50 ` [PATCH V2 09/30] rtc: rtc-ep93xx: " Jingoo Han
@ 2013-03-06 7:50 ` Jingoo Han
2013-03-06 7:51 ` [PATCH V2 11/30] rtc: rtc-lp8788: " Jingoo Han
` (19 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:50 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-imxdi.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 73cf81c..33914e2 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 11/30] rtc: rtc-lp8788: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (8 preceding siblings ...)
2013-03-06 7:50 ` [PATCH V2 10/30] rtc: rtc-imxdi: " Jingoo Han
@ 2013-03-06 7:51 ` Jingoo Han
2013-03-06 7:51 ` [PATCH V2 12/30] rtc: rtc-lpc32xx: " Jingoo Han
` (18 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:51 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-lp8788.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-lp8788.c b/drivers/rtc/rtc-lp8788.c
index 9a46312..9853ac1 100644
--- a/drivers/rtc/rtc-lp8788.c
+++ b/drivers/rtc/rtc-lp8788.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 12/30] rtc: rtc-lpc32xx: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (9 preceding siblings ...)
2013-03-06 7:51 ` [PATCH V2 11/30] rtc: rtc-lp8788: " Jingoo Han
@ 2013-03-06 7:51 ` Jingoo Han
2013-03-06 7:51 ` [PATCH V2 13/30] rtc: rtc-max77686: " Jingoo Han
` (17 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:51 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-lpc32xx.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c
index 40a5983..787550d 100644
--- a/drivers/rtc/rtc-lpc32xx.c
+++ b/drivers/rtc/rtc-lpc32xx.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 13/30] rtc: rtc-max77686: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (10 preceding siblings ...)
2013-03-06 7:51 ` [PATCH V2 12/30] rtc: rtc-lpc32xx: " Jingoo Han
@ 2013-03-06 7:51 ` Jingoo Han
2013-03-06 7:52 ` [PATCH V2 14/30] rtc: rtc-max8907: " Jingoo Han
` (16 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:51 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler. Also, this patch uses devm_request_threaded_irq().
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-max77686.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index df66bab..5a12b32 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 14/30] rtc: rtc-max8907: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (11 preceding siblings ...)
2013-03-06 7:51 ` [PATCH V2 13/30] rtc: rtc-max77686: " Jingoo Han
@ 2013-03-06 7:52 ` Jingoo Han
2013-03-06 7:52 ` [PATCH V2 15/30] rtc: rtc-max8997: " Jingoo Han
` (15 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:52 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-max8907.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-max8907.c b/drivers/rtc/rtc-max8907.c
index 31ca8fa..9d62cdb 100644
--- a/drivers/rtc/rtc-max8907.c
+++ b/drivers/rtc/rtc-max8907.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 15/30] rtc: rtc-max8997: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (12 preceding siblings ...)
2013-03-06 7:52 ` [PATCH V2 14/30] rtc: rtc-max8907: " Jingoo Han
@ 2013-03-06 7:52 ` Jingoo Han
2013-03-06 7:53 ` [PATCH V2 16/30] rtc: rtc-mv: " Jingoo Han
` (14 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:52 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-max8997.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c
index 00e505b..d12acc4 100644
--- a/drivers/rtc/rtc-max8997.c
+++ b/drivers/rtc/rtc-max8997.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 16/30] rtc: rtc-mv: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (13 preceding siblings ...)
2013-03-06 7:52 ` [PATCH V2 15/30] rtc: rtc-max8997: " Jingoo Han
@ 2013-03-06 7:53 ` Jingoo Han
2013-03-06 7:53 ` [PATCH V2 17/30] rtc: rtc-mxc: " Jingoo Han
` (13 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:53 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-mv.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
index 59d1671..cb2b76a 100644
--- a/drivers/rtc/rtc-mv.c
+++ b/drivers/rtc/rtc-mv.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 17/30] rtc: rtc-mxc: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (14 preceding siblings ...)
2013-03-06 7:53 ` [PATCH V2 16/30] rtc: rtc-mv: " Jingoo Han
@ 2013-03-06 7:53 ` Jingoo Han
2013-03-06 7:53 ` [PATCH V2 18/30] rtc: rtc-palmas: " Jingoo Han
` (12 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:53 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-mxc.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 1c3ef72..13380ca 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -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);
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 18/30] rtc: rtc-palmas: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (15 preceding siblings ...)
2013-03-06 7:53 ` [PATCH V2 17/30] rtc: rtc-mxc: " Jingoo Han
@ 2013-03-06 7:53 ` Jingoo Han
2013-03-06 7:53 ` [PATCH V2 19/30] rtc: rtc-pcf8523: " Jingoo Han
` (11 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:53 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-palmas.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-palmas.c b/drivers/rtc/rtc-palmas.c
index df9359c..bbc3b9ef 100644
--- a/drivers/rtc/rtc-palmas.c
+++ b/drivers/rtc/rtc-palmas.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 19/30] rtc: rtc-pcf8523: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (16 preceding siblings ...)
2013-03-06 7:53 ` [PATCH V2 18/30] rtc: rtc-palmas: " Jingoo Han
@ 2013-03-06 7:53 ` Jingoo Han
2013-03-06 7:54 ` [PATCH V2 20/30] rtc: rtc-s3c: " Jingoo Han
` (10 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:53 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-pcf8523.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c
index 889e316..305c951 100644
--- a/drivers/rtc/rtc-pcf8523.c
+++ b/drivers/rtc/rtc-pcf8523.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 20/30] rtc: rtc-s3c: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (17 preceding siblings ...)
2013-03-06 7:53 ` [PATCH V2 19/30] rtc: rtc-pcf8523: " Jingoo Han
@ 2013-03-06 7:54 ` Jingoo Han
2013-03-06 7:54 ` [PATCH V2 21/30] rtc: rtc-snvs: " Jingoo Han
` (9 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:54 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-s3c.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index fb994e9..7dcf719 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -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);
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 21/30] rtc: rtc-snvs: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (18 preceding siblings ...)
2013-03-06 7:54 ` [PATCH V2 20/30] rtc: rtc-s3c: " Jingoo Han
@ 2013-03-06 7:54 ` Jingoo Han
2013-03-06 7:54 ` [PATCH V2 22/30] rtc: rtc-spear: " Jingoo Han
` (8 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:54 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-snvs.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index f7d9070..b04f09a 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 22/30] rtc: rtc-spear: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (19 preceding siblings ...)
2013-03-06 7:54 ` [PATCH V2 21/30] rtc: rtc-snvs: " Jingoo Han
@ 2013-03-06 7:54 ` Jingoo Han
2013-03-06 13:39 ` Viresh Kumar
2013-03-06 7:55 ` [PATCH V2 23/30] rtc: rtc-stk17ta8: " Jingoo Han
` (7 subsequent siblings)
28 siblings, 1 reply; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:54 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-spear.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
index a18c319..db3ef61 100644
--- a/drivers/rtc/rtc-spear.c
+++ b/drivers/rtc/rtc-spear.c
@@ -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);
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* Re: [PATCH V2 22/30] rtc: rtc-spear: use devm_rtc_device_register()
2013-03-06 7:54 ` [PATCH V2 22/30] rtc: rtc-spear: " Jingoo Han
@ 2013-03-06 13:39 ` Viresh Kumar
0 siblings, 0 replies; 31+ messages in thread
From: Viresh Kumar @ 2013-03-06 13:39 UTC (permalink / raw)
To: Jingoo Han; +Cc: Andrew Morton, linux-kernel, Alessandro Zummo, rtc-linux
On Wed, Mar 6, 2013 at 3:54 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> devm_rtc_device_register() is device managed and makes cleanup
> paths simpler.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> Changes since v1:
> - used 'struct device *dev' as the first argument
>
> drivers/rtc/rtc-spear.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH V2 23/30] rtc: rtc-stk17ta8: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (20 preceding siblings ...)
2013-03-06 7:54 ` [PATCH V2 22/30] rtc: rtc-spear: " Jingoo Han
@ 2013-03-06 7:55 ` Jingoo Han
2013-03-06 7:55 ` [PATCH V2 24/30] rtc: rtc-tegra: " Jingoo Han
` (6 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:55 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-stk17ta8.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index 7e4a6f6..af5e97e 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 24/30] rtc: rtc-tegra: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (21 preceding siblings ...)
2013-03-06 7:55 ` [PATCH V2 23/30] rtc: rtc-stk17ta8: " Jingoo Han
@ 2013-03-06 7:55 ` Jingoo Han
2013-03-06 7:55 ` [PATCH V2 25/30] rtc: rtc-tps6586x: " Jingoo Han
` (5 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:55 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-tegra.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index 0020bab..8dbf2dc 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -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;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 25/30] rtc: rtc-tps6586x: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (22 preceding siblings ...)
2013-03-06 7:55 ` [PATCH V2 24/30] rtc: rtc-tegra: " Jingoo Han
@ 2013-03-06 7:55 ` Jingoo Han
2013-03-06 7:56 ` [PATCH V2 26/30] rtc: rtc-tps65910: " Jingoo Han
` (4 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:55 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-tps6586x.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
index aab4e8c..b6aab9f 100644
--- a/drivers/rtc/rtc-tps6586x.c
+++ b/drivers/rtc/rtc-tps6586x.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 26/30] rtc: rtc-tps65910: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (23 preceding siblings ...)
2013-03-06 7:55 ` [PATCH V2 25/30] rtc: rtc-tps6586x: " Jingoo Han
@ 2013-03-06 7:56 ` Jingoo Han
2013-03-06 7:56 ` [PATCH V2 27/30] rtc: rtc-tps80031: " Jingoo Han
` (3 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:56 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-tps65910.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 8bd8115..ef5d199 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 27/30] rtc: rtc-tps80031: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (24 preceding siblings ...)
2013-03-06 7:56 ` [PATCH V2 26/30] rtc: rtc-tps65910: " Jingoo Han
@ 2013-03-06 7:56 ` Jingoo Han
2013-03-06 7:56 ` [PATCH V2 28/30] rtc: rtc-tx4939: " Jingoo Han
` (2 subsequent siblings)
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:56 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-tps80031.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-tps80031.c b/drivers/rtc/rtc-tps80031.c
index 9aaf8aa..dc62d5f 100644
--- a/drivers/rtc/rtc-tps80031.c
+++ b/drivers/rtc/rtc-tps80031.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 28/30] rtc: rtc-tx4939: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (25 preceding siblings ...)
2013-03-06 7:56 ` [PATCH V2 27/30] rtc: rtc-tps80031: " Jingoo Han
@ 2013-03-06 7:56 ` Jingoo Han
2013-03-06 7:57 ` [PATCH V2 29/30] rtc: rtc-vt8500: " Jingoo Han
2013-03-06 7:57 ` [PATCH V2 30/30] rtc: rtc-wm831x: " Jingoo Han
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:56 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-tx4939.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c
index a12bfac..cf28f68 100644
--- a/drivers/rtc/rtc-tx4939.c
+++ b/drivers/rtc/rtc-tx4939.c
@@ -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);
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 29/30] rtc: rtc-vt8500: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (26 preceding siblings ...)
2013-03-06 7:56 ` [PATCH V2 28/30] rtc: rtc-tx4939: " Jingoo Han
@ 2013-03-06 7:57 ` Jingoo Han
2013-03-06 7:57 ` [PATCH V2 30/30] rtc: rtc-wm831x: " Jingoo Han
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:57 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-vt8500.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c
index a000bc0..d89efee 100644
--- a/drivers/rtc/rtc-vt8500.c
+++ b/drivers/rtc/rtc-vt8500.c
@@ -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);
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread* [PATCH V2 30/30] rtc: rtc-wm831x: use devm_rtc_device_register()
2013-03-06 7:47 [PATCH V2 01/30] rtc: rtc-88pm80x: use devm_rtc_device_register() Jingoo Han
` (27 preceding siblings ...)
2013-03-06 7:57 ` [PATCH V2 29/30] rtc: rtc-vt8500: " Jingoo Han
@ 2013-03-06 7:57 ` Jingoo Han
28 siblings, 0 replies; 31+ messages in thread
From: Jingoo Han @ 2013-03-06 7:57 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: linux-kernel, 'Alessandro Zummo', rtc-linux,
'Jingoo Han'
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since v1:
- used 'struct device *dev' as the first argument
drivers/rtc/rtc-wm831x.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index 2f0ac7b..8d65b94 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -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;
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 31+ messages in thread