All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver
@ 2012-02-23 16:03 ` John Crispin
  0 siblings, 0 replies; 8+ messages in thread
From: John Crispin @ 2012-02-23 16:03 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, John Crispin, linux-mtd

Reduce boilerplate code by converting driver to module_platform_driver.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mtd@lists.infradead.org
---
 drivers/mtd/maps/lantiq-flash.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c
index 7b889de..395ebfe 100644
--- a/drivers/mtd/maps/lantiq-flash.c
+++ b/drivers/mtd/maps/lantiq-flash.c
@@ -107,7 +107,7 @@ ltq_copy_to(struct map_info *map, unsigned long to,
 	spin_unlock_irqrestore(&ebu_lock, flags);
 }
 
-static int __init
+static int __devinit
 ltq_mtd_probe(struct platform_device *pdev)
 {
 	struct physmap_flash_data *ltq_mtd_data = dev_get_platdata(&pdev->dev);
@@ -203,6 +203,7 @@ ltq_mtd_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver ltq_mtd_driver = {
+	.probe = ltq_mtd_probe,
 	.remove = __devexit_p(ltq_mtd_remove),
 	.driver = {
 		.name = "ltq_nor",
@@ -210,24 +211,7 @@ static struct platform_driver ltq_mtd_driver = {
 	},
 };
 
-static int __init
-init_ltq_mtd(void)
-{
-	int ret = platform_driver_probe(&ltq_mtd_driver, ltq_mtd_probe);
-
-	if (ret)
-		pr_err("ltq_nor: error registering platform driver");
-	return ret;
-}
-
-static void __exit
-exit_ltq_mtd(void)
-{
-	platform_driver_unregister(&ltq_mtd_driver);
-}
-
-module_init(init_ltq_mtd);
-module_exit(exit_ltq_mtd);
+module_platform_driver(ltq_mtd_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver
@ 2012-02-23 16:03 ` John Crispin
  0 siblings, 0 replies; 8+ messages in thread
From: John Crispin @ 2012-02-23 16:03 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, linux-mtd, John Crispin

Reduce boilerplate code by converting driver to module_platform_driver.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mtd@lists.infradead.org
---
 drivers/mtd/maps/lantiq-flash.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c
index 7b889de..395ebfe 100644
--- a/drivers/mtd/maps/lantiq-flash.c
+++ b/drivers/mtd/maps/lantiq-flash.c
@@ -107,7 +107,7 @@ ltq_copy_to(struct map_info *map, unsigned long to,
 	spin_unlock_irqrestore(&ebu_lock, flags);
 }
 
-static int __init
+static int __devinit
 ltq_mtd_probe(struct platform_device *pdev)
 {
 	struct physmap_flash_data *ltq_mtd_data = dev_get_platdata(&pdev->dev);
@@ -203,6 +203,7 @@ ltq_mtd_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver ltq_mtd_driver = {
+	.probe = ltq_mtd_probe,
 	.remove = __devexit_p(ltq_mtd_remove),
 	.driver = {
 		.name = "ltq_nor",
@@ -210,24 +211,7 @@ static struct platform_driver ltq_mtd_driver = {
 	},
 };
 
-static int __init
-init_ltq_mtd(void)
-{
-	int ret = platform_driver_probe(&ltq_mtd_driver, ltq_mtd_probe);
-
-	if (ret)
-		pr_err("ltq_nor: error registering platform driver");
-	return ret;
-}
-
-static void __exit
-exit_ltq_mtd(void)
-{
-	platform_driver_unregister(&ltq_mtd_driver);
-}
-
-module_init(init_ltq_mtd);
-module_exit(exit_ltq_mtd);
+module_platform_driver(ltq_mtd_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH V2 2/3] NET: MIPS: lantiq: use module_platform_driver inside lantiq ethernet driver
  2012-02-23 16:03 ` John Crispin
  (?)
@ 2012-02-23 16:03 ` John Crispin
  -1 siblings, 0 replies; 8+ messages in thread
From: John Crispin @ 2012-02-23 16:03 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, John Crispin, netdev

Reduce boilerplate code by converting driver to module_platform_driver.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/lantiq_etop.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 6b2e4b4..584794f 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -839,7 +839,7 @@ static const struct net_device_ops ltq_eth_netdev_ops = {
 	.ndo_tx_timeout = ltq_etop_tx_timeout,
 };
 
-static int __init
+static int __devinit
 ltq_etop_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
@@ -959,6 +959,7 @@ ltq_etop_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver ltq_mii_driver = {
+	.probe = ltq_etop_probe,
 	.remove = __devexit_p(ltq_etop_remove),
 	.driver = {
 		.name = "ltq_etop",
@@ -966,24 +967,7 @@ static struct platform_driver ltq_mii_driver = {
 	},
 };
 
-int __init
-init_ltq_etop(void)
-{
-	int ret = platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
-
-	if (ret)
-		pr_err("ltq_etop: Error registering platfom driver!");
-	return ret;
-}
-
-static void __exit
-exit_ltq_etop(void)
-{
-	platform_driver_unregister(&ltq_mii_driver);
-}
-
-module_init(init_ltq_etop);
-module_exit(exit_ltq_etop);
+module_platform_driver(ltq_mii_driver);
 
 MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
 MODULE_DESCRIPTION("Lantiq SoC ETOP");
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH V2 3/3] WDT: MIPS: lantiq: use module_platform_driver inside lantiq watchdog driver
  2012-02-23 16:03 ` John Crispin
  (?)
  (?)
@ 2012-02-23 16:03 ` John Crispin
  -1 siblings, 0 replies; 8+ messages in thread
From: John Crispin @ 2012-02-23 16:03 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, John Crispin, linux-watchdog

Reduce boilerplate code by converting driver to module_platform_driver.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-watchdog@vger.kernel.org
---
 drivers/watchdog/lantiq_wdt.c |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c
index fa4866b..70127b3 100644
--- a/drivers/watchdog/lantiq_wdt.c
+++ b/drivers/watchdog/lantiq_wdt.c
@@ -182,7 +182,7 @@ static struct miscdevice ltq_wdt_miscdev = {
 	.fops	= &ltq_wdt_fops,
 };
 
-static int __init
+static int __devinit
 ltq_wdt_probe(struct platform_device *pdev)
 {
 	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -227,6 +227,7 @@ ltq_wdt_remove(struct platform_device *pdev)
 
 
 static struct platform_driver ltq_wdt_driver = {
+	.probe = ltq_wdt_probe,
 	.remove = __devexit_p(ltq_wdt_remove),
 	.driver = {
 		.name = "ltq_wdt",
@@ -234,21 +235,7 @@ static struct platform_driver ltq_wdt_driver = {
 	},
 };
 
-static int __init
-init_ltq_wdt(void)
-{
-	return platform_driver_probe(&ltq_wdt_driver, ltq_wdt_probe);
-}
-
-static void __exit
-exit_ltq_wdt(void)
-{
-	return platform_driver_unregister(&ltq_wdt_driver);
-}
-
-module_init(init_ltq_wdt);
-module_exit(exit_ltq_wdt);
-
+module_platform_driver(ltq_wdt_driver);
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
 
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver
  2012-02-23 16:03 ` John Crispin
@ 2012-03-09 11:28   ` Artem Bityutskiy
  -1 siblings, 0 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2012-03-09 11:28 UTC (permalink / raw)
  To: John Crispin; +Cc: Ralf Baechle, linux-mips, linux-mtd

On Thu, 2012-02-23 at 17:03 +0100, John Crispin wrote:
> Reduce boilerplate code by converting driver to module_platform_driver.
> 
> Signed-off-by: John Crispin <blogic@openwrt.org>
> Cc: linux-mtd@lists.infradead.org

This is not an independent patch - do you want to merge it via the mips
tree?

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver
@ 2012-03-09 11:28   ` Artem Bityutskiy
  0 siblings, 0 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2012-03-09 11:28 UTC (permalink / raw)
  To: John Crispin; +Cc: linux-mips, linux-mtd, Ralf Baechle

On Thu, 2012-02-23 at 17:03 +0100, John Crispin wrote:
> Reduce boilerplate code by converting driver to module_platform_driver.
> 
> Signed-off-by: John Crispin <blogic@openwrt.org>
> Cc: linux-mtd@lists.infradead.org

This is not an independent patch - do you want to merge it via the mips
tree?

-- 
Best Regards,
Artem Bityutskiy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver
  2012-03-09 11:28   ` Artem Bityutskiy
@ 2012-03-09 11:29     ` John Crispin
  -1 siblings, 0 replies; 8+ messages in thread
From: John Crispin @ 2012-03-09 11:29 UTC (permalink / raw)
  To: dedekind1; +Cc: Ralf Baechle, linux-mips, linux-mtd

On 09/03/12 12:28, Artem Bityutskiy wrote:
> On Thu, 2012-02-23 at 17:03 +0100, John Crispin wrote:
>> Reduce boilerplate code by converting driver to module_platform_driver.
>>
>> Signed-off-by: John Crispin <blogic@openwrt.org>
>> Cc: linux-mtd@lists.infradead.org
> This is not an independent patch - do you want to merge it via the mips
> tree?
>
via MIPS, sorry for not putting the info in the commit text

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver
@ 2012-03-09 11:29     ` John Crispin
  0 siblings, 0 replies; 8+ messages in thread
From: John Crispin @ 2012-03-09 11:29 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mips, linux-mtd, Ralf Baechle

On 09/03/12 12:28, Artem Bityutskiy wrote:
> On Thu, 2012-02-23 at 17:03 +0100, John Crispin wrote:
>> Reduce boilerplate code by converting driver to module_platform_driver.
>>
>> Signed-off-by: John Crispin <blogic@openwrt.org>
>> Cc: linux-mtd@lists.infradead.org
> This is not an independent patch - do you want to merge it via the mips
> tree?
>
via MIPS, sorry for not putting the info in the commit text

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-03-09 11:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 16:03 [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver John Crispin
2012-02-23 16:03 ` John Crispin
2012-02-23 16:03 ` [PATCH V2 2/3] NET: MIPS: lantiq: use module_platform_driver inside lantiq ethernet driver John Crispin
2012-02-23 16:03 ` [PATCH V2 3/3] WDT: MIPS: lantiq: use module_platform_driver inside lantiq watchdog driver John Crispin
2012-03-09 11:28 ` [PATCH V2 1/3] MTD: MIPS: lantiq: use module_platform_driver inside lantiq map driver Artem Bityutskiy
2012-03-09 11:28   ` Artem Bityutskiy
2012-03-09 11:29   ` John Crispin
2012-03-09 11:29     ` John Crispin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.