diff mbox

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

Message ID 1349270797-19189-2-git-send-email-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Shevchenko Oct. 3, 2012, 1:26 p.m. UTC
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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Comments

Girish K S Oct. 3, 2012, 1:56 p.m. UTC | #1
Reviewd By:Girish K S <girish.shivanajappa@linaro.org>

On 3 October 2012 22:26, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> 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.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
> index 777c585..779335b 100644
> --- a/drivers/mmc/host/dw_mmc-pltfm.c
> +++ b/drivers/mmc/host/dw_mmc-pltfm.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Will Newton Oct. 4, 2012, 12:10 p.m. UTC | #2
On Wed, Oct 3, 2012 at 2:26 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> 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.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)

Acked-by: Will Newton <will.newton@imgtec.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chris Ball Oct. 23, 2012, 9:14 p.m. UTC | #3
Hi,

On Thu, Oct 04 2012, Will Newton wrote:
> On Wed, Oct 3, 2012 at 2:26 PM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> 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.
>>
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> ---
>>  drivers/mmc/host/dw_mmc-pltfm.c |   14 ++------------
>>  1 file changed, 2 insertions(+), 12 deletions(-)
>
> Acked-by: Will Newton <will.newton@imgtec.com>

Thanks, pushed to mmc-next for 3.8.

- Chris.
diff mbox

Patch

diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 777c585..779335b 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -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");