Messages in this thread Patch in this message | | | From | "R, Durgadoss" <> | Date | Mon, 28 Nov 2011 11:10:30 +0530 | Subject | RE: [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
| |