lkml.org 
[lkml]   [2011]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRE: [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver()
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
\
 
 \ /
  Last update: 2011-11-28 06:45    [W:0.067 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site