Skip to contentSkip to conversation

rtc: rtc-ab3100: use module_platform_driver_probe()

PATCH In review Jingoo Han 4 participants 30 messages Mar 4, 2013 – Mar 7, 2013

Subsystems (6)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/24 rtc: rtc-ab3100: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-ab3100.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
drivers/rtc/rtc-ab3100.c +1 -13
index 261a07e..c2f12d3 100644
@@ -257,19 +257,7 @@ static struct platform_driver ab3100_rtc_driver = {
 	.remove	 = __exit_p(ab3100_rtc_remove),
 };
 
-static int __init ab3100_rtc_init(void)
-{
-	return platform_driver_probe(&ab3100_rtc_driver,
-				     ab3100_rtc_probe);
-}
-
-static void __exit ab3100_rtc_exit(void)
-{
-	platform_driver_unregister(&ab3100_rtc_driver);
-}
-
-module_init(ab3100_rtc_init);
-module_exit(ab3100_rtc_exit);
+module_platform_driver_probe(ab3100_rtc_driver, ab3100_rtc_probe);
 
 MODULE_AUTHOR("Linus Walleij <[email protected]>");
 MODULE_DESCRIPTION("AB3100 RTC Driver");
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH 2/24 rtc: rtc-at32ap700x: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-at32ap700x.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/rtc/rtc-at32ap700x.c +1 -11
index 8dd0830..619c887 100644
@@ -302,17 +302,7 @@ static struct platform_driver at32_rtc_driver = {
 	},
 };
 
-static int __init at32_rtc_init(void)
-{
-	return platform_driver_probe(&at32_rtc_driver, at32_rtc_probe);
-}
-module_init(at32_rtc_init);
-
-static void __exit at32_rtc_exit(void)
-{
-	platform_driver_unregister(&at32_rtc_driver);
-}
-module_exit(at32_rtc_exit);
+module_platform_driver_probe(at32_rtc_driver, at32_rtc_probe);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <[email protected]>");
 MODULE_DESCRIPTION("Real time clock for AVR32 AT32AP700x");
Signature · 1 line
1.7.2.5
author
#2 lore raw

PATCH 3/24 rtc: rtc-at91rm9200: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-at91rm9200.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-at91rm9200.c +1 -12
index 434ebc3..f63c8fe 100644
@@ -390,18 +390,7 @@ static struct platform_driver at91_rtc_driver = {
 	},
 };
 
-static int __init at91_rtc_init(void)
-{
-	return platform_driver_probe(&at91_rtc_driver, at91_rtc_probe);
-}
-
-static void __exit at91_rtc_exit(void)
-{
-	platform_driver_unregister(&at91_rtc_driver);
-}
-
-module_init(at91_rtc_init);
-module_exit(at91_rtc_exit);
+module_platform_driver_probe(at91_rtc_driver, at91_rtc_probe);
 
 MODULE_AUTHOR("Rick Bronson");
 MODULE_DESCRIPTION("RTC driver for Atmel AT91RM9200");
Signature · 1 line
1.7.2.5
author
#3 lore raw

PATCH 4/24 rtc: rtc-au1xxx: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-au1xxx.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-au1xxx.c +1 -12
index b309da4..dfd6d66 100644
@@ -134,18 +134,7 @@ static struct platform_driver au1xrtc_driver = {
 	.remove		= au1xtoy_rtc_remove,
 };
 
-static int __init au1xtoy_rtc_init(void)
-{
-	return platform_driver_probe(&au1xrtc_driver, au1xtoy_rtc_probe);
-}
-
-static void __exit au1xtoy_rtc_exit(void)
-{
-	platform_driver_unregister(&au1xrtc_driver);
-}
-
-module_init(au1xtoy_rtc_init);
-module_exit(au1xtoy_rtc_exit);
+module_platform_driver_probe(au1xrtc_driver, au1xtoy_rtc_probe);
 
 MODULE_DESCRIPTION("Au1xxx TOY-counter-based RTC driver");
 MODULE_AUTHOR("Manuel Lauss <[email protected]>");
Signature · 1 line
1.7.2.5
author
#4 lore raw

PATCH 5/24 rtc: rtc-coh901331: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-coh901331.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-coh901331.c +1 -12
index 2d28ec1a..f53fcd6 100644
@@ -287,18 +287,7 @@ static struct platform_driver coh901331_driver = {
 	.shutdown = coh901331_shutdown,
 };
 
-static int __init coh901331_init(void)
-{
-	return platform_driver_probe(&coh901331_driver, coh901331_probe);
-}
-
-static void __exit coh901331_exit(void)
-{
-	platform_driver_unregister(&coh901331_driver);
-}
-
-module_init(coh901331_init);
-module_exit(coh901331_exit);
+module_platform_driver_probe(coh901331_driver, coh901331_probe);
 
 MODULE_AUTHOR("Linus Walleij <[email protected]>");
 MODULE_DESCRIPTION("ST-Ericsson AB COH 901 331 RTC Driver");
Signature · 1 line
1.7.2.5
author
#6 lore raw

PATCH 6/24 rtc: rtc-davinci: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-davinci.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/rtc/rtc-davinci.c +1 -11
index db877e0..1b0f9322 100644
@@ -588,17 +588,7 @@ static struct platform_driver davinci_rtc_driver = {
 	},
 };
 
-static int __init rtc_init(void)
-{
-	return platform_driver_probe(&davinci_rtc_driver, davinci_rtc_probe);
-}
-module_init(rtc_init);
-
-static void __exit rtc_exit(void)
-{
-	platform_driver_unregister(&davinci_rtc_driver);
-}
-module_exit(rtc_exit);
+module_platform_driver_probe(davinci_rtc_driver, davinci_rtc_probe);
 
 MODULE_AUTHOR("Miguel Aguilar <[email protected]>");
 MODULE_DESCRIPTION("Texas Instruments DaVinci PRTC Driver");
Signature · 1 line
1.7.2.5
author
#7 lore raw

PATCH 7/24 rtc: rtc-ds1302: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-ds1302.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-ds1302.c +1 -12
index d20b5f1..7d4c2b4 100644
@@ -252,18 +252,7 @@ static struct platform_driver ds1302_platform_driver = {
 	.remove		= __exit_p(ds1302_rtc_remove),
 };
 
-static int __init ds1302_rtc_init(void)
-{
-	return platform_driver_probe(&ds1302_platform_driver, ds1302_rtc_probe);
-}
-
-static void __exit ds1302_rtc_exit(void)
-{
-	platform_driver_unregister(&ds1302_platform_driver);
-}
-
-module_init(ds1302_rtc_init);
-module_exit(ds1302_rtc_exit);
+module_platform_driver_probe(ds1302_platform_driver, ds1302_rtc_probe);
 
 MODULE_DESCRIPTION("Dallas DS1302 RTC driver");
 MODULE_VERSION(DRV_VERSION);
Signature · 1 line
1.7.2.5
author
#8 lore raw

PATCH 8/24 rtc: rtc-efi: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-efi.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-efi.c +1 -12
index 1a0c37c..e706662 100644
@@ -218,18 +218,7 @@ static struct platform_driver efi_rtc_driver = {
 	.remove = __exit_p(efi_rtc_remove),
 };
 
-static int __init efi_rtc_init(void)
-{
-	return platform_driver_probe(&efi_rtc_driver, efi_rtc_probe);
-}
-
-static void __exit efi_rtc_exit(void)
-{
-	platform_driver_unregister(&efi_rtc_driver);
-}
-
-module_init(efi_rtc_init);
-module_exit(efi_rtc_exit);
+module_platform_driver_probe(efi_rtc_driver, efi_rtc_probe);
 
 MODULE_AUTHOR("dann frazier <[email protected]>");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
author
#9 lore raw

PATCH 9/24 rtc: rtc-generic: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-generic.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-generic.c +1 -12
index 98322004..0bf4530 100644
@@ -65,18 +65,7 @@ static struct platform_driver generic_rtc_driver = {
 	.remove = __exit_p(generic_rtc_remove),
 };
 
-static int __init generic_rtc_init(void)
-{
-	return platform_driver_probe(&generic_rtc_driver, generic_rtc_probe);
-}
-
-static void __exit generic_rtc_fini(void)
-{
-	platform_driver_unregister(&generic_rtc_driver);
-}
-
-module_init(generic_rtc_init);
-module_exit(generic_rtc_fini);
+module_platform_driver_probe(generic_rtc_driver, generic_rtc_probe);
 
 MODULE_AUTHOR("Kyle McMartin <[email protected]>");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
author
#10 lore raw

PATCH 10/24 rtc: rtc-imxdi: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-imxdi.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-imxdi.c +1 -12
index 73cf81c..a5a143e 100644
@@ -513,18 +513,7 @@ static struct platform_driver dryice_rtc_driver = {
 	.remove = __exit_p(dryice_rtc_remove),
 };
 
-static int __init dryice_rtc_init(void)
-{
-	return platform_driver_probe(&dryice_rtc_driver, dryice_rtc_probe);
-}
-
-static void __exit dryice_rtc_exit(void)
-{
-	platform_driver_unregister(&dryice_rtc_driver);
-}
-
-module_init(dryice_rtc_init);
-module_exit(dryice_rtc_exit);
+module_platform_driver_probe(dryice_rtc_driver, dryice_rtc_probe);
 
 MODULE_AUTHOR("Freescale Semiconductor, Inc.");
 MODULE_AUTHOR("Baruch Siach <[email protected]>");
Signature · 1 line
1.7.2.5
author
#11 lore raw

PATCH 11/24 rtc: rtc-mc13xxx: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-mc13xxx.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/rtc/rtc-mc13xxx.c +1 -11
index 2643d88..5391b15 100644
@@ -420,17 +420,7 @@ static struct platform_driver mc13xxx_rtc_driver = {
 	},
 };
 
-static int __init mc13xxx_rtc_init(void)
-{
-	return platform_driver_probe(&mc13xxx_rtc_driver, &mc13xxx_rtc_probe);
-}
-module_init(mc13xxx_rtc_init);
-
-static void __exit mc13xxx_rtc_exit(void)
-{
-	platform_driver_unregister(&mc13xxx_rtc_driver);
-}
-module_exit(mc13xxx_rtc_exit);
+module_platform_driver_probe(mc13xxx_rtc_driver, &mc13xxx_rtc_probe);
 
 MODULE_AUTHOR("Sascha Hauer <[email protected]>");
 MODULE_DESCRIPTION("RTC driver for Freescale MC13XXX PMIC");
Signature · 1 line
1.7.2.5
author
#12 lore raw

PATCH 12/24 rtc: rtc-msm6242: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-msm6242.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-msm6242.c +1 -12
index fcb113c..3ac1e8e 100644
@@ -252,18 +252,7 @@ static struct platform_driver msm6242_rtc_driver = {
 	.remove	= __exit_p(msm6242_rtc_remove),
 };
 
-static int __init msm6242_rtc_init(void)
-{
-	return platform_driver_probe(&msm6242_rtc_driver, msm6242_rtc_probe);
-}
-
-static void __exit msm6242_rtc_fini(void)
-{
-	platform_driver_unregister(&msm6242_rtc_driver);
-}
-
-module_init(msm6242_rtc_init);
-module_exit(msm6242_rtc_fini);
+module_platform_driver_probe(msm6242_rtc_driver, msm6242_rtc_probe);
 
 MODULE_AUTHOR("Geert Uytterhoeven <[email protected]>");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
Acked-by on v1 12/24
#13 lore raw

Re: [PATCH 12/24] rtc: rtc-msm6242: use module_platform_driver_probe()

Quoted 4 lines · Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

Quoted 18 lines
---
 drivers/rtc/rtc-msm6242.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-msm6242.c +0 -6
index fcb113c..3ac1e8e 100644
@@ -252,18 +252,7 @@ static struct platform_driver msm6242_rtc_driver = {
        .remove = __exit_p(msm6242_rtc_remove),
 };
 
-static int __init msm6242_rtc_init(void)
-{
-       return platform_driver_probe(&msm6242_rtc_driver, msm6242_rtc_probe);
-}
-
-static void __exit msm6242_rtc_fini(void)

drivers/rtc/rtc-msm6242.c static struct platform_driver msm6242_rtc_driver = { · line 258

Quoted 10 lines
drivers/rtc/rtc-msm6242.c +1 -6
-{
-       platform_driver_unregister(&msm6242_rtc_driver);
-}
-
-module_init(msm6242_rtc_init);
-module_exit(msm6242_rtc_fini);
+module_platform_driver_probe(msm6242_rtc_driver, msm6242_rtc_probe);
 
 MODULE_AUTHOR("Geert Uytterhoeven <[email protected]>");
 MODULE_LICENSE("GPL");

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author
#14 lore raw

PATCH 13/24 rtc: rtc-mv: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-mv.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-mv.c +1 -12
index 59d1671..1583d62 100644
@@ -311,18 +311,7 @@ static struct platform_driver mv_rtc_driver = {
 	},
 };
 
-static __init int mv_init(void)
-{
-	return platform_driver_probe(&mv_rtc_driver, mv_rtc_probe);
-}
-
-static __exit void mv_exit(void)
-{
-	platform_driver_unregister(&mv_rtc_driver);
-}
-
-module_init(mv_init);
-module_exit(mv_exit);
+module_platform_driver_probe(mv_rtc_driver, mv_rtc_probe);
 
 MODULE_AUTHOR("Saeed Bishara <[email protected]>");
 MODULE_DESCRIPTION("Marvell RTC driver");
Signature · 1 line
1.7.2.5
author
#15 lore raw

PATCH 14/24 rtc: rtc-nuc900: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-nuc900.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-nuc900.c +1 -12
index 06b98fb..4d9525c 100644
@@ -311,18 +311,7 @@ static struct platform_driver nuc900_rtc_driver = {
 	},
 };
 
-static int __init nuc900_rtc_init(void)
-{
-	return platform_driver_probe(&nuc900_rtc_driver, nuc900_rtc_probe);
-}
-
-static void __exit nuc900_rtc_exit(void)
-{
-	platform_driver_unregister(&nuc900_rtc_driver);
-}
-
-module_init(nuc900_rtc_init);
-module_exit(nuc900_rtc_exit);
+module_platform_driver_probe(nuc900_rtc_driver, nuc900_rtc_probe);
 
 MODULE_AUTHOR("Wan ZongShun <[email protected]>");
 MODULE_DESCRIPTION("nuc910/nuc920 RTC driver");
Signature · 1 line
1.7.2.5
author
#16 lore raw

PATCH 15/24 rtc: rtc-omap: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-omap.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/rtc/rtc-omap.c +1 -11
index 6009714..172cc5c 100644
@@ -550,17 +550,7 @@ static struct platform_driver omap_rtc_driver = {
 	.id_table	= omap_rtc_devtype,
 };
 
-static int __init rtc_init(void)
-{
-	return platform_driver_probe(&omap_rtc_driver, omap_rtc_probe);
-}
-module_init(rtc_init);
-
-static void __exit rtc_exit(void)
-{
-	platform_driver_unregister(&omap_rtc_driver);
-}
-module_exit(rtc_exit);
+module_platform_driver_probe(omap_rtc_driver, omap_rtc_probe);
 
 MODULE_AUTHOR("George G. Davis (and others)");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
author
#17 lore raw

PATCH 16/24 rtc: rtc-pcap: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-pcap.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-pcap.c +1 -12
index 48db88a..ce09824 100644
@@ -203,18 +203,7 @@ static struct platform_driver pcap_rtc_driver = {
 	},
 };
 
-static int __init rtc_pcap_init(void)
-{
-	return platform_driver_probe(&pcap_rtc_driver, pcap_rtc_probe);
-}
-
-static void __exit rtc_pcap_exit(void)
-{
-	platform_driver_unregister(&pcap_rtc_driver);
-}
-
-module_init(rtc_pcap_init);
-module_exit(rtc_pcap_exit);
+module_platform_driver_probe(pcap_rtc_driver, pcap_rtc_probe);
 
 MODULE_DESCRIPTION("Motorola pcap rtc driver");
 MODULE_AUTHOR("guiming zhuo <[email protected]>");
Signature · 1 line
1.7.2.5
author
#18 lore raw

PATCH 17/24 rtc: rtc-ps3: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-ps3.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-ps3.c +1 -12
index 968133c..846722d 100644
@@ -85,18 +85,7 @@ static struct platform_driver ps3_rtc_driver = {
 	.remove = __exit_p(ps3_rtc_remove),
 };
 
-static int __init ps3_rtc_init(void)
-{
-	return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
-}
-
-static void __exit ps3_rtc_fini(void)
-{
-	platform_driver_unregister(&ps3_rtc_driver);
-}
-
-module_init(ps3_rtc_init);
-module_exit(ps3_rtc_fini);
+module_platform_driver_probe(ps3_rtc_driver, ps3_rtc_probe);
 
 MODULE_AUTHOR("Sony Corporation");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
Acked-by on v1 17/24
#19 lore raw

Re: [PATCH 17/24] rtc: rtc-ps3: use module_platform_driver_probe()

Quoted 4 lines · Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

Quoted 18 lines
---
 drivers/rtc/rtc-ps3.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-ps3.c +0 -6
index 968133c..846722d 100644
@@ -85,18 +85,7 @@ static struct platform_driver ps3_rtc_driver = {
        .remove = __exit_p(ps3_rtc_remove),
 };
 
-static int __init ps3_rtc_init(void)
-{
-       return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
-}
-
-static void __exit ps3_rtc_fini(void)

drivers/rtc/rtc-ps3.c static struct platform_driver ps3_rtc_driver = { · line 91

Quoted 10 lines
drivers/rtc/rtc-ps3.c +1 -6
-{
-       platform_driver_unregister(&ps3_rtc_driver);
-}
-
-module_init(ps3_rtc_init);
-module_exit(ps3_rtc_fini);
+module_platform_driver_probe(ps3_rtc_driver, ps3_rtc_probe);
 
 MODULE_AUTHOR("Sony Corporation");
 MODULE_LICENSE("GPL");

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author
#20 lore raw

PATCH 18/24 rtc: rtc-pxa: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-pxa.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-pxa.c +1 -12
index b7e46297..72e13da 100644
@@ -502,18 +502,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);
-}
-
-static void __exit pxa_rtc_exit(void)
-{
-	platform_driver_unregister(&pxa_rtc_driver);
-}
-
-module_init(pxa_rtc_init);
-module_exit(pxa_rtc_exit);
+module_platform_driver_probe(pxa_rtc_driver, pxa_rtc_probe);
 
 MODULE_AUTHOR("Robert Jarzmik <[email protected]>");
 MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)");
Signature · 1 line
1.7.2.5
author
#21 lore raw

PATCH 19/24 rtc: rtc-rp5c01: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-rp5c01.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-rp5c01.c +1 -12
index 359da6d..d25d2f6 100644
@@ -294,18 +294,7 @@ static struct platform_driver rp5c01_rtc_driver = {
 	.remove	= __exit_p(rp5c01_rtc_remove),
 };
 
-static int __init rp5c01_rtc_init(void)
-{
-	return platform_driver_probe(&rp5c01_rtc_driver, rp5c01_rtc_probe);
-}
-
-static void __exit rp5c01_rtc_fini(void)
-{
-	platform_driver_unregister(&rp5c01_rtc_driver);
-}
-
-module_init(rp5c01_rtc_init);
-module_exit(rp5c01_rtc_fini);
+module_platform_driver_probe(rp5c01_rtc_driver, rp5c01_rtc_probe);
 
 MODULE_AUTHOR("Geert Uytterhoeven <[email protected]>");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
Acked-by on v1 19/24
#22 lore raw

Re: [PATCH 19/24] rtc: rtc-rp5c01: use module_platform_driver_probe()

Quoted 4 lines · Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

Quoted 18 lines
---
 drivers/rtc/rtc-rp5c01.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-rp5c01.c +0 -6
index 359da6d..d25d2f6 100644
@@ -294,18 +294,7 @@ static struct platform_driver rp5c01_rtc_driver = {
        .remove = __exit_p(rp5c01_rtc_remove),
 };
 
-static int __init rp5c01_rtc_init(void)
-{
-       return platform_driver_probe(&rp5c01_rtc_driver, rp5c01_rtc_probe);
-}
-
-static void __exit rp5c01_rtc_fini(void)

drivers/rtc/rtc-rp5c01.c static struct platform_driver rp5c01_rtc_driver = { · line 300

Quoted 10 lines
drivers/rtc/rtc-rp5c01.c +1 -6
-{
-       platform_driver_unregister(&rp5c01_rtc_driver);
-}
-
-module_init(rp5c01_rtc_init);
-module_exit(rp5c01_rtc_fini);
+module_platform_driver_probe(rp5c01_rtc_driver, rp5c01_rtc_probe);
 
 MODULE_AUTHOR("Geert Uytterhoeven <[email protected]>");
 MODULE_LICENSE("GPL");

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author
#23 lore raw

PATCH 20/24 rtc: rtc-sh: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-sh.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-sh.c +1 -12
index e55a763..5f47085 100644
@@ -820,18 +820,7 @@ static struct platform_driver sh_rtc_platform_driver = {
 	.remove		= __exit_p(sh_rtc_remove),
 };
 
-static int __init sh_rtc_init(void)
-{
-	return platform_driver_probe(&sh_rtc_platform_driver, sh_rtc_probe);
-}
-
-static void __exit sh_rtc_exit(void)
-{
-	platform_driver_unregister(&sh_rtc_platform_driver);
-}
-
-module_init(sh_rtc_init);
-module_exit(sh_rtc_exit);
+module_platform_driver_probe(sh_rtc_platform_driver, sh_rtc_probe);
 
 MODULE_DESCRIPTION("SuperH on-chip RTC driver");
 MODULE_VERSION(DRV_VERSION);
Signature · 1 line
1.7.2.5
author
#25 lore raw

PATCH 21/24 rtc: rtc-starfire: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-starfire.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-starfire.c +1 -12
index 5be98bf..db7d076 100644
@@ -66,15 +66,4 @@ static struct platform_driver starfire_rtc_driver = {
 	.remove		= __exit_p(starfire_rtc_remove),
 };
 
-static int __init starfire_rtc_init(void)
-{
-	return platform_driver_probe(&starfire_rtc_driver, starfire_rtc_probe);
-}
-
-static void __exit starfire_rtc_exit(void)
-{
-	platform_driver_unregister(&starfire_rtc_driver);
-}
-
-module_init(starfire_rtc_init);
-module_exit(starfire_rtc_exit);
+module_platform_driver_probe(starfire_rtc_driver, starfire_rtc_probe);
Signature · 1 line
1.7.2.5
author
#26 lore raw

PATCH 22/24 rtc: rtc-sun4v: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-sun4v.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-sun4v.c +1 -12
index 59b5c2d..7c51c49 100644
@@ -106,18 +106,7 @@ static struct platform_driver sun4v_rtc_driver = {
 	.remove		= __exit_p(sun4v_rtc_remove),
 };
 
-static int __init sun4v_rtc_init(void)
-{
-	return platform_driver_probe(&sun4v_rtc_driver, sun4v_rtc_probe);
-}
-
-static void __exit sun4v_rtc_exit(void)
-{
-	platform_driver_unregister(&sun4v_rtc_driver);
-}
-
-module_init(sun4v_rtc_init);
-module_exit(sun4v_rtc_exit);
+module_platform_driver_probe(sun4v_rtc_driver, sun4v_rtc_probe);
 
 MODULE_AUTHOR("David S. Miller <[email protected]>");
 MODULE_DESCRIPTION("SUN4V RTC driver");
Signature · 1 line
1.7.2.5
author
#27 lore raw

PATCH 23/24 rtc: rtc-tegra: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-tegra.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/rtc/rtc-tegra.c +1 -11
index 0020bab..9447d65 100644
@@ -452,17 +452,7 @@ static struct platform_driver tegra_rtc_driver = {
 #endif
 };
 
-static int __init tegra_rtc_init(void)
-{
-	return platform_driver_probe(&tegra_rtc_driver, tegra_rtc_probe);
-}
-module_init(tegra_rtc_init);
-
-static void __exit tegra_rtc_exit(void)
-{
-	platform_driver_unregister(&tegra_rtc_driver);
-}
-module_exit(tegra_rtc_exit);
+module_platform_driver_probe(tegra_rtc_driver, tegra_rtc_probe);
 
 MODULE_AUTHOR("Jon Mayo <[email protected]>");
 MODULE_DESCRIPTION("driver for Tegra internal RTC");
Signature · 1 line
1.7.2.5
author
#28 lore raw

PATCH 24/24 rtc: rtc-tx4939: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/rtc/rtc-tx4939.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/rtc/rtc-tx4939.c +1 -12
index a12bfac..4f2c082 100644
@@ -299,18 +299,7 @@ static struct platform_driver tx4939_rtc_driver = {
 	},
 };
 
-static int __init tx4939rtc_init(void)
-{
-	return platform_driver_probe(&tx4939_rtc_driver, tx4939_rtc_probe);
-}
-
-static void __exit tx4939rtc_exit(void)
-{
-	platform_driver_unregister(&tx4939_rtc_driver);
-}
-
-module_init(tx4939rtc_init);
-module_exit(tx4939rtc_exit);
+module_platform_driver_probe(tx4939_rtc_driver, tx4939_rtc_probe);
 
 MODULE_AUTHOR("Atsushi Nemoto <[email protected]>");
 MODULE_DESCRIPTION("TX4939 internal RTC driver");
Signature · 1 line
1.7.2.5