* [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver()
@ 2011-11-26 4:14 Axel Lin
2011-11-28 5:40 ` R, Durgadoss
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-11-26 4:14 UTC (permalink / raw)
To: linux-kernel
Cc: Hong Liu, Durgadoss R, Daniel Drake, Matthew Garrett,
platform-driver-x86
This patch converts the drivers in drivers/platform/x86/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Hong Liu <hong.liu@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: Daniel Drake <dsd@laptop.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/platform/x86/intel_mid_powerbtn.c | 12 +-----------
drivers/platform/x86/intel_mid_thermal.c | 13 +------------
drivers/platform/x86/xo1-rfkill.c | 13 +------------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/drivers/platform/x86/intel_mid_powerbtn.c b/drivers/platform/x86/intel_mid_powerbtn.c
index f1ae507..ff3de34 100644
--- a/drivers/platform/x86/intel_mid_powerbtn.c
+++ b/drivers/platform/x86/intel_mid_powerbtn.c
@@ -118,17 +118,7 @@ static struct platform_driver mfld_pb_driver = {
.remove = __devexit_p(mfld_pb_remove),
};
-static int __init mfld_pb_init(void)
-{
- return platform_driver_register(&mfld_pb_driver);
-}
-module_init(mfld_pb_init);
-
-static void __exit mfld_pb_exit(void)
-{
- platform_driver_unregister(&mfld_pb_driver);
-}
-module_exit(mfld_pb_exit);
+module_platform_driver(mfld_pb_driver);
MODULE_AUTHOR("Hong Liu <hong.liu@intel.com>");
MODULE_DESCRIPTION("Intel Medfield Power Button Driver");
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index ccd7b1f..e4cc992 100644
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@ -565,18 +565,7 @@ static struct platform_driver mid_thermal_driver = {
.id_table = therm_id_table,
};
-static int __init mid_thermal_module_init(void)
-{
- return platform_driver_register(&mid_thermal_driver);
-}
-
-static void __exit mid_thermal_module_exit(void)
-{
- platform_driver_unregister(&mid_thermal_driver);
-}
-
-module_init(mid_thermal_module_init);
-module_exit(mid_thermal_module_exit);
+module_platform_driver(mid_thermal_driver);
MODULE_AUTHOR("Durgadoss R <durgadoss.r@intel.com>");
MODULE_DESCRIPTION("Intel Medfield Platform Thermal Driver");
diff --git a/drivers/platform/x86/xo1-rfkill.c b/drivers/platform/x86/xo1-rfkill.c
index e549eee..41781ed 100644
--- a/drivers/platform/x86/xo1-rfkill.c
+++ b/drivers/platform/x86/xo1-rfkill.c
@@ -67,19 +67,8 @@ static struct platform_driver xo1_rfkill_driver = {
.remove = __devexit_p(xo1_rfkill_remove),
};
-static int __init xo1_rfkill_init(void)
-{
- return platform_driver_register(&xo1_rfkill_driver);
-}
-
-static void __exit xo1_rfkill_exit(void)
-{
- platform_driver_unregister(&xo1_rfkill_driver);
-}
+module_platform_driver(xo1_rfkill_driver);
MODULE_AUTHOR("Daniel Drake <dsd@laptop.org>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:xo1-rfkill");
-
-module_init(xo1_rfkill_init);
-module_exit(xo1_rfkill_exit);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver()
2011-11-26 4:14 [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver() Axel Lin
@ 2011-11-28 5:40 ` R, Durgadoss
0 siblings, 0 replies; 4+ messages in thread
From: R, Durgadoss @ 2011-11-28 5:40 UTC (permalink / raw)
To: Axel Lin, linux-kernel@vger.kernel.org
Cc: Liu, Hong, Daniel Drake, Matthew Garrett,
platform-driver-x86@vger.kernel.org
Hi,
Thanks for the nice clean up for intel_mid_thermal.c
From which kernel version is this new macro supported ?
> -----Original Message-----
> From: Axel Lin [mailto:axel.lin@gmail.com]
> Sent: Saturday, November 26, 2011 9:45 AM
> To: linux-kernel@vger.kernel.org
> Cc: Liu, Hong; R, Durgadoss; Daniel Drake; Matthew Garrett; platform-driver-
> x86@vger.kernel.org
> Subject: [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use
> module_platform_driver()
>
> This patch converts the drivers in drivers/platform/x86/* to use the
> module_platform_driver() macro which makes the code smaller and a bit
> simpler.
>
> Cc: Hong Liu <hong.liu@intel.com>
> Cc: Durgadoss R <durgadoss.r@intel.com>
> Cc: Daniel Drake <dsd@laptop.org>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
Acked-by: Durgadoss R <Durgadoss.r@intel.com>
> diff --git a/drivers/platform/x86/intel_mid_thermal.c
> b/drivers/platform/x86/intel_mid_thermal.c
> index ccd7b1f..e4cc992 100644
> --- a/drivers/platform/x86/intel_mid_thermal.c
> +++ b/drivers/platform/x86/intel_mid_thermal.c
> @@ -565,18 +565,7 @@ static struct platform_driver mid_thermal_driver = {
> .id_table = therm_id_table,
> };
>
> -static int __init mid_thermal_module_init(void)
> -{
> - return platform_driver_register(&mid_thermal_driver);
> -}
> -
> -static void __exit mid_thermal_module_exit(void)
> -{
> - platform_driver_unregister(&mid_thermal_driver);
> -}
> -
> -module_init(mid_thermal_module_init);
> -module_exit(mid_thermal_module_exit);
> +module_platform_driver(mid_thermal_driver);
Thanks,
Durga
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver()
@ 2011-11-28 5:40 ` R, Durgadoss
0 siblings, 0 replies; 4+ messages in thread
From: R, Durgadoss @ 2011-11-28 5:40 UTC (permalink / raw)
To: Axel Lin, linux-kernel@vger.kernel.org
Cc: Liu, Hong, Daniel Drake, Matthew Garrett,
platform-driver-x86@vger.kernel.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1747 bytes --]
Hi,
Thanks for the nice clean up for intel_mid_thermal.c
>From which kernel version is this new macro supported ?
> -----Original Message-----
> From: Axel Lin [mailto:axel.lin@gmail.com]
> Sent: Saturday, November 26, 2011 9:45 AM
> To: linux-kernel@vger.kernel.org
> Cc: Liu, Hong; R, Durgadoss; Daniel Drake; Matthew Garrett; platform-driver-
> x86@vger.kernel.org
> Subject: [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use
> module_platform_driver()
>
> This patch converts the drivers in drivers/platform/x86/* to use the
> module_platform_driver() macro which makes the code smaller and a bit
> simpler.
>
> Cc: Hong Liu <hong.liu@intel.com>
> Cc: Durgadoss R <durgadoss.r@intel.com>
> Cc: Daniel Drake <dsd@laptop.org>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
Acked-by: Durgadoss R <Durgadoss.r@intel.com>
> diff --git a/drivers/platform/x86/intel_mid_thermal.c
> b/drivers/platform/x86/intel_mid_thermal.c
> index ccd7b1f..e4cc992 100644
> --- a/drivers/platform/x86/intel_mid_thermal.c
> +++ b/drivers/platform/x86/intel_mid_thermal.c
> @@ -565,18 +565,7 @@ static struct platform_driver mid_thermal_driver = {
> .id_table = therm_id_table,
> };
>
> -static int __init mid_thermal_module_init(void)
> -{
> - return platform_driver_register(&mid_thermal_driver);
> -}
> -
> -static void __exit mid_thermal_module_exit(void)
> -{
> - platform_driver_unregister(&mid_thermal_driver);
> -}
> -
> -module_init(mid_thermal_module_init);
> -module_exit(mid_thermal_module_exit);
> +module_platform_driver(mid_thermal_driver);
Thanks,
Durga
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver()
2011-11-28 5:40 ` R, Durgadoss
(?)
@ 2011-11-28 5:44 ` Axel Lin
-1 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2011-11-28 5:44 UTC (permalink / raw)
To: R, Durgadoss
Cc: linux-kernel@vger.kernel.org, Liu, Hong, Daniel Drake,
Matthew Garrett, platform-driver-x86@vger.kernel.org
2011/11/28 R, Durgadoss <durgadoss.r@intel.com>:
> Hi,
>
> Thanks for the nice clean up for intel_mid_thermal.c
>
> From which kernel version is this new macro supported ?
>
module_platform_driver() is already in current Linus's tree ( linux-3.2 rcX)
Regards,
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-28 5:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-26 4:14 [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver() Axel Lin
2011-11-28 5:40 ` R, Durgadoss
2011-11-28 5:40 ` R, Durgadoss
2011-11-28 5:44 ` Axel Lin
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.