* [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc
@ 2010-09-29 10:02 Haojian Zhuang
2010-09-29 10:02 ` [PATCH 2/2] rtc: use __devinit instead on pxa-rtc Haojian Zhuang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Haojian Zhuang @ 2010-09-29 10:02 UTC (permalink / raw)
To: linux-arm-kernel
pxa-rtc is widely used in pxa27x/pxa3xx/pxa93x/pxa95x. Checking cpuid in
pxa-rtc driver is unnecessary since we assign on-chip device in soc files.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Alessandro Zummo <a.zummo@towertech.it>
---
drivers/rtc/rtc-pxa.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index 29e867a..4bcc520 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -477,10 +477,7 @@ static struct platform_driver pxa_rtc_driver = {
static int __init pxa_rtc_init(void)
{
- if (cpu_is_pxa27x() || cpu_is_pxa3xx())
- return platform_driver_probe(&pxa_rtc_driver, pxa_rtc_probe);
-
- return -ENODEV;
+ return platform_driver_probe(&pxa_rtc_driver, pxa_rtc_probe);
}
static void __exit pxa_rtc_exit(void)
--
1.5.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] rtc: use __devinit instead on pxa-rtc
2010-09-29 10:02 [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc Haojian Zhuang
@ 2010-09-29 10:02 ` Haojian Zhuang
2010-10-01 17:06 ` Robert Jarzmik
2010-10-01 7:36 ` [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc Alessandro Zummo
2010-10-01 17:03 ` Robert Jarzmik
2 siblings, 1 reply; 5+ messages in thread
From: Haojian Zhuang @ 2010-09-29 10:02 UTC (permalink / raw)
To: linux-arm-kernel
Avoid to use __init/__exit on probe()/remove(). Use __devinit/__devexit
instead.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Alessandro Zummo <a.zummo@towertech.it>
---
drivers/rtc/rtc-pxa.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index 4bcc520..f520daf 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -352,7 +352,7 @@ static const struct rtc_class_ops pxa_rtc_ops = {
.irq_set_freq = pxa_periodic_irq_set_freq,
};
-static int __init pxa_rtc_probe(struct platform_device *pdev)
+static int __devinit pxa_rtc_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct pxa_rtc *pxa_rtc;
@@ -425,7 +425,7 @@ err_map:
return ret;
}
-static int __exit pxa_rtc_remove(struct platform_device *pdev)
+static int __devexit pxa_rtc_remove(struct platform_device *pdev)
{
struct pxa_rtc *pxa_rtc = platform_get_drvdata(pdev);
@@ -466,7 +466,8 @@ static const struct dev_pm_ops pxa_rtc_pm_ops = {
#endif
static struct platform_driver pxa_rtc_driver = {
- .remove = __exit_p(pxa_rtc_remove),
+ .probe = pxa_rtc_probe,
+ .remove = __devexit_p(pxa_rtc_remove),
.driver = {
.name = "pxa-rtc",
#ifdef CONFIG_PM
@@ -477,7 +478,7 @@ static struct platform_driver pxa_rtc_driver = {
static int __init pxa_rtc_init(void)
{
- return platform_driver_probe(&pxa_rtc_driver, pxa_rtc_probe);
+ return platform_driver_register(&pxa_rtc_driver);
}
static void __exit pxa_rtc_exit(void)
--
1.5.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc
2010-09-29 10:02 [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc Haojian Zhuang
2010-09-29 10:02 ` [PATCH 2/2] rtc: use __devinit instead on pxa-rtc Haojian Zhuang
@ 2010-10-01 7:36 ` Alessandro Zummo
2010-10-01 17:03 ` Robert Jarzmik
2 siblings, 0 replies; 5+ messages in thread
From: Alessandro Zummo @ 2010-10-01 7:36 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 29 Sep 2010 18:02:14 +0800
Haojian Zhuang <haojian.zhuang@marvell.com> wrote:
> pxa-rtc is widely used in pxa27x/pxa3xx/pxa93x/pxa95x. Checking cpuid in
> pxa-rtc driver is unnecessary since we assign on-chip device in soc files.
seems reasonable.
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
--
Best regards,
Alessandro Zummo,
Tower Technologies - Torino, Italy
http://www.towertech.it
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc
2010-09-29 10:02 [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc Haojian Zhuang
2010-09-29 10:02 ` [PATCH 2/2] rtc: use __devinit instead on pxa-rtc Haojian Zhuang
2010-10-01 7:36 ` [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc Alessandro Zummo
@ 2010-10-01 17:03 ` Robert Jarzmik
2 siblings, 0 replies; 5+ messages in thread
From: Robert Jarzmik @ 2010-10-01 17:03 UTC (permalink / raw)
To: linux-arm-kernel
Haojian Zhuang <haojian.zhuang@marvell.com> writes:
> pxa-rtc is widely used in pxa27x/pxa3xx/pxa93x/pxa95x. Checking cpuid in
> pxa-rtc driver is unnecessary since we assign on-chip device in soc files.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
> Cc: Eric Miao <eric.y.miao@gmail.com>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
--
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-01 17:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 10:02 [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc Haojian Zhuang
2010-09-29 10:02 ` [PATCH 2/2] rtc: use __devinit instead on pxa-rtc Haojian Zhuang
2010-10-01 17:06 ` Robert Jarzmik
2010-10-01 7:36 ` [PATCH 1/2] rtc: avoid checking cpuid in pxa-rtc Alessandro Zummo
2010-10-01 17:03 ` Robert Jarzmik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).