Skip to contentSkip to conversation

mmc: dw_mmc: use __devinit_p macro for .remove()

PATCH Superseded Andy Shevchenko 4 participants 11 messages Oct 3, 2012 – Oct 23, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mmc: dw_mmc: use __devinit_p macro for .remove()

---
 drivers/mmc/host/dw_mmc-pci.c   |    2 +-
 drivers/mmc/host/dw_mmc-pltfm.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/dw_mmc-pci.c +1 -1
index edb37e9..53a09cb 100644
@@ -134,7 +134,7 @@ static struct pci_driver dw_mci_pci_driver = {
 	.name		= "dw_mmc_pci",
 	.id_table	= dw_mci_pci_id,
 	.probe		= dw_mci_pci_probe,
-	.remove		= dw_mci_pci_remove,
+	.remove		= __devexit_p(dw_mci_pci_remove),
 	.driver		=	{
 		.pm =   &dw_mci_pci_pmops
 	},
drivers/mmc/host/dw_mmc-pltfm.c +1 -1
index c960ca7..777c585 100644
@@ -119,7 +119,7 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
 
 static struct platform_driver dw_mci_pltfm_driver = {
-	.remove		= __exit_p(dw_mci_pltfm_remove),
+	.remove		= __devexit_p(dw_mci_pltfm_remove),
 	.driver		= {
 		.name		= "dw_mmc",
 		.of_match_table	= of_match_ptr(dw_mci_pltfm_match),
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 mmc: dw_mmc: use helper macro module_platform_driver()

Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro.

---
 drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/mmc/host/dw_mmc-pltfm.c +2 -12
index 777c585..779335b 100644
@@ -119,6 +119,7 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
 
 static struct platform_driver dw_mci_pltfm_driver = {
+	.probe		= dw_mci_pltfm_probe,
 	.remove		= __devexit_p(dw_mci_pltfm_remove),
 	.driver		= {
 		.name		= "dw_mmc",
@@ -127,18 +128,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
 	},
 };
 
-static int __init dw_mci_init(void)
-{
-	return platform_driver_probe(&dw_mci_pltfm_driver, dw_mci_pltfm_probe);
-}
-
-static void __exit dw_mci_exit(void)
-{
-	platform_driver_unregister(&dw_mci_pltfm_driver);
-}
-
-module_init(dw_mci_init);
-module_exit(dw_mci_exit);
+module_platform_driver(dw_mci_pltfm_driver);
 
 MODULE_DESCRIPTION("DW Multimedia Card Interface driver");
 MODULE_AUTHOR("NXP Semiconductor VietNam");
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH 2/2] mmc: dw_mmc: use helper macro module_platform_driver()

Reviewd By:Girish K S <[email protected]>

Quoted 47 lines · Andy Shevchenko

Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro.

---
 drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/mmc/host/dw_mmc-pltfm.c +2 -13
index 777c585..779335b 100644
@@ -119,6 +119,7 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
 
 static struct platform_driver dw_mci_pltfm_driver = {
+       .probe          = dw_mci_pltfm_probe,
        .remove         = __devexit_p(dw_mci_pltfm_remove),
        .driver         = {
                .name           = "dw_mmc",
@@ -127,18 +128,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
        },
 };
 
-static int __init dw_mci_init(void)
-{
-       return platform_driver_probe(&dw_mci_pltfm_driver, dw_mci_pltfm_probe);
-}
-
-static void __exit dw_mci_exit(void)
-{
-       platform_driver_unregister(&dw_mci_pltfm_driver);
-}
-
-module_init(dw_mci_init);
-module_exit(dw_mci_exit);
+module_platform_driver(dw_mci_pltfm_driver);
 
 MODULE_DESCRIPTION("DW Multimedia Card Interface driver");
 MODULE_AUTHOR("NXP Semiconductor VietNam");
--

1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] mmc: dw_mmc: use helper macro module_platform_driver()

In reply to Andy Shevchenko
Quoted 7 lines · Andy Shevchenko

Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro.

---
 drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
#4 lore raw

Re: [PATCH 2/2] mmc: dw_mmc: use helper macro module_platform_driver()

Hi,

Quoted 11 lines · Will Newton
Quoted 7 lines · Andy Shevchenko

Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro.

---
 drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Thanks, pushed to mmc-next for 3.8.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#5 lore raw
In reply to Andy Shevchenko

its __devexit_p not __devinit_p

Quoted 39 lines · Andy Shevchenko
---
 drivers/mmc/host/dw_mmc-pci.c   |    2 +-
 drivers/mmc/host/dw_mmc-pltfm.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/dw_mmc-pci.c +1 -1
index edb37e9..53a09cb 100644
@@ -134,7 +134,7 @@ static struct pci_driver dw_mci_pci_driver = {
        .name           = "dw_mmc_pci",
        .id_table       = dw_mci_pci_id,
        .probe          = dw_mci_pci_probe,
-       .remove         = dw_mci_pci_remove,
+       .remove         = __devexit_p(dw_mci_pci_remove),
        .driver         =       {
                .pm =   &dw_mci_pci_pmops
        },
drivers/mmc/host/dw_mmc-pltfm.c +1 -2
index c960ca7..777c585 100644
@@ -119,7 +119,7 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
 
 static struct platform_driver dw_mci_pltfm_driver = {
-       .remove         = __exit_p(dw_mci_pltfm_remove),
+       .remove         = __devexit_p(dw_mci_pltfm_remove),
        .driver         = {
                .name           = "dw_mmc",
                .of_match_table = of_match_ptr(dw_mci_pltfm_match),
--

1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 1 line · Girish K S

its __devexit_p not __devinit_p

True. Thanks for catching this typo.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#7 lore raw

PATCH v2 1/1 mmc: dw_mmc: use __devexit_p macro for .remove()

In reply to Girish K S
---
 drivers/mmc/host/dw_mmc-pci.c   |    2 +-
 drivers/mmc/host/dw_mmc-pltfm.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/dw_mmc-pci.c +1 -1
index edb37e9..53a09cb 100644
@@ -134,7 +134,7 @@ static struct pci_driver dw_mci_pci_driver = {
 	.name		= "dw_mmc_pci",
 	.id_table	= dw_mci_pci_id,
 	.probe		= dw_mci_pci_probe,
-	.remove		= dw_mci_pci_remove,
+	.remove		= __devexit_p(dw_mci_pci_remove),
 	.driver		=	{
 		.pm =   &dw_mci_pci_pmops
 	},
drivers/mmc/host/dw_mmc-pltfm.c +1 -1
index c960ca7..777c585 100644
@@ -119,7 +119,7 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
 
 static struct platform_driver dw_mci_pltfm_driver = {
-	.remove		= __exit_p(dw_mci_pltfm_remove),
+	.remove		= __devexit_p(dw_mci_pltfm_remove),
 	.driver		= {
 		.name		= "dw_mmc",
 		.of_match_table	= of_match_ptr(dw_mci_pltfm_match),
Signature · 1 line
1.7.10.4
#8 lore raw

Re: [PATCHv2] mmc: dw_mmc: use __devexit_p macro for .remove()

Reviewed By:- Girish K S <[email protected]>

Quoted 35 lines · Andy Shevchenko
---
 drivers/mmc/host/dw_mmc-pci.c   |    2 +-
 drivers/mmc/host/dw_mmc-pltfm.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/dw_mmc-pci.c +1 -1
index edb37e9..53a09cb 100644
@@ -134,7 +134,7 @@ static struct pci_driver dw_mci_pci_driver = {
        .name           = "dw_mmc_pci",
        .id_table       = dw_mci_pci_id,
        .probe          = dw_mci_pci_probe,
-       .remove         = dw_mci_pci_remove,
+       .remove         = __devexit_p(dw_mci_pci_remove),
        .driver         =       {
                .pm =   &dw_mci_pci_pmops
        },
drivers/mmc/host/dw_mmc-pltfm.c +1 -2
index c960ca7..777c585 100644
@@ -119,7 +119,7 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);
 
 static struct platform_driver dw_mci_pltfm_driver = {
-       .remove         = __exit_p(dw_mci_pltfm_remove),
+       .remove         = __devexit_p(dw_mci_pltfm_remove),
        .driver         = {
                .name           = "dw_mmc",
                .of_match_table = of_match_ptr(dw_mci_pltfm_match),
--

1.7.10.4

#10 lore raw

Re: [PATCHv2] mmc: dw_mmc: use __devexit_p macro for .remove()

Hi,

Quoted 9 lines · Will Newton
Quoted 5 lines · Andy Shevchenko
---
 drivers/mmc/host/dw_mmc-pci.c   |    2 +-
 drivers/mmc/host/dw_mmc-pltfm.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Thanks, pushed to mmc-next for 3.8

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child