linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Anand <pratyush.anand@st.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ira W. Snyder" <iws@ovro.caltech.edu>,
	Pavan Savoy <pavan_savoy@ti.com>,
	Donggeun Kim <dg77.kim@samsung.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <greg@kroah.com>
Subject: Re: [PATCH 1/3] MISC: convert drivers/misc/* to use module_platform_driver()
Date: Mon, 23 Jan 2012 08:57:04 +0530	[thread overview]
Message-ID: <4F1CD388.9080805@st.com> (raw)
In-Reply-To: <1327217629.6497.0.camel@phoenix>

On 1/22/2012 1:03 PM, Axel Lin wrote:
> This patch converts the drivers in drivers/misc/* to use the
> module_platform_driver() macro which makes the code smaller and a bit
> simpler.
>
> Signed-off-by: Axel Lin<axel.lin@gmail.com>
> Cc: Ira W. Snyder<iws@ovro.caltech.edu>
> Cc: Pratyush Anand<pratyush.anand@st.com>
> Cc: Pavan Savoy<pavan_savoy@ti.com>
> Cc: Donggeun Kim<dg77.kim@samsung.com>
> Acked-by: Arnd Bergmann<arnd@arndb.de>
> Acked-by: Pratyush Anand<pratyush.anand@st.com>
> ---
>   drivers/misc/carma/carma-fpga.c      |   17 +----------------
>   drivers/misc/max8997-muic.c          |   12 +-----------
>   drivers/misc/spear13xx_pcie_gadget.c |   12 +-----------
>   drivers/misc/ti-st/st_kim.c          |   13 +------------
>   4 files changed, 4 insertions(+), 50 deletions(-)
>
> diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c
> index 14e974b2..366bc15 100644
> --- a/drivers/misc/carma/carma-fpga.c
> +++ b/drivers/misc/carma/carma-fpga.c
> @@ -1410,23 +1410,8 @@ static struct platform_driver data_of_driver = {
>   	},
>   };
>
> -/*
> - * Module Init / Exit
> - */
> -
> -static int __init data_init(void)
> -{
> -	return platform_driver_register(&data_of_driver);
> -}
> -
> -static void __exit data_exit(void)
> -{
> -	platform_driver_unregister(&data_of_driver);
> -}
> +module_platform_driver(data_of_driver);
>
>   MODULE_AUTHOR("Ira W. Snyder<iws@ovro.caltech.edu>");
>   MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver");
>   MODULE_LICENSE("GPL");
> -
> -module_init(data_init);
> -module_exit(data_exit);
> diff --git a/drivers/misc/max8997-muic.c b/drivers/misc/max8997-muic.c
> index d74ef41..19591ea 100644
> --- a/drivers/misc/max8997-muic.c
> +++ b/drivers/misc/max8997-muic.c
> @@ -488,17 +488,7 @@ static struct platform_driver max8997_muic_driver = {
>   	.remove		= __devexit_p(max8997_muic_remove),
>   };
>
> -static int __init max8997_muic_init(void)
> -{
> -	return platform_driver_register(&max8997_muic_driver);
> -}
> -module_init(max8997_muic_init);
> -
> -static void __exit max8997_muic_exit(void)
> -{
> -	platform_driver_unregister(&max8997_muic_driver);
> -}
> -module_exit(max8997_muic_exit);
> +module_platform_driver(max8997_muic_driver);
>
>   MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver");
>   MODULE_AUTHOR("Donggeun Kim<dg77.kim@samsung.com>");
> diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c
> index 43d073b..123ed98 100644
> --- a/drivers/misc/spear13xx_pcie_gadget.c
> +++ b/drivers/misc/spear13xx_pcie_gadget.c
> @@ -891,17 +891,7 @@ static struct platform_driver spear_pcie_gadget_driver = {
>   	},
>   };
>
> -static int __init spear_pcie_gadget_init(void)
> -{
> -	return platform_driver_register(&spear_pcie_gadget_driver);
> -}
> -module_init(spear_pcie_gadget_init);
> -
> -static void __exit spear_pcie_gadget_exit(void)
> -{
> -	platform_driver_unregister(&spear_pcie_gadget_driver);
> -}
> -module_exit(spear_pcie_gadget_exit);
> +module_platform_driver(spear_pcie_gadget_driver);
>
>   MODULE_ALIAS("platform:pcie-gadget-spear");
>   MODULE_AUTHOR("Pratyush Anand");
> diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
> index a7a861c..7c14f8f 100644
> --- a/drivers/misc/ti-st/st_kim.c
> +++ b/drivers/misc/ti-st/st_kim.c
> @@ -837,19 +837,8 @@ static struct platform_driver kim_platform_driver = {
>   	},
>   };
>
> -static int __init st_kim_init(void)
> -{
> -	return platform_driver_register(&kim_platform_driver);
> -}
> -
> -static void __exit st_kim_deinit(void)
> -{
> -	platform_driver_unregister(&kim_platform_driver);
> -}
> -
> +module_platform_driver(kim_platform_driver);
>
> -module_init(st_kim_init);
> -module_exit(st_kim_deinit);
>   MODULE_AUTHOR("Pavan Savoy<pavan_savoy@ti.com>");
>   MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips ");
>   MODULE_LICENSE("GPL");

Acked-By: Pratyush Anand <pratyush.anand@st.com>

  parent reply	other threads:[~2012-01-23  3:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-22  7:33 [PATCH 1/3] MISC: convert drivers/misc/* to use module_platform_driver() Axel Lin
2012-01-22  7:36 ` [PATCH 2/3] MISC: convert drivers/misc/* to use module_i2c_driver() Axel Lin
2012-01-22  7:38 ` [PATCH 3/3] MISC: convert drivers/misc/* to use module_spi_driver() Axel Lin
2012-01-23  3:27 ` Pratyush Anand [this message]
2012-01-23 16:44 ` [PATCH 1/3] MISC: convert drivers/misc/* to use module_platform_driver() Ira W. Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F1CD388.9080805@st.com \
    --to=pratyush.anand@st.com \
    --cc=arnd@arndb.de \
    --cc=axel.lin@gmail.com \
    --cc=dg77.kim@samsung.com \
    --cc=greg@kroah.com \
    --cc=iws@ovro.caltech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavan_savoy@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).