RE: [PATCH] platform-drivers-x86: convert drivers/platform/x86/* to use module_platform_driver()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx]
> Sent: Saturday, November 26, 2011 9:45 AM
> To: linux-kernel@xxxxxxxxxxxxxxx
> Cc: Liu, Hong; R, Durgadoss; Daniel Drake; Matthew Garrett; platform-driver-
> x86@xxxxxxxxxxxxxxx
> 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@xxxxxxxxx>
> Cc: Durgadoss R <durgadoss.r@xxxxxxxxx>
> Cc: Daniel Drake <dsd@xxxxxxxxxx>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> ---


Acked-by: Durgadoss R <Durgadoss.r@xxxxxxxxx>

> 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��������+%������w��{.n������_���v��z����n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux