power_supply: Convert drivers/power/* to use module_platform_driver()
This patch converts the drivers in drivers/power/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Mike Rapoport <mike@compulab.co.il> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Nithish Mahalingam <nithish.mahalingam@intel.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Balaji Rao <balajirrao@openmoko.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Clifton Barnes <cabarnes@indesign-llc.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
This commit is contained in:
parent
251f39fe42
commit
300bac7fb8
@ -588,18 +588,7 @@ static struct platform_driver da903x_battery_driver = {
|
|||||||
.remove = da9030_battery_remove,
|
.remove = da9030_battery_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int da903x_battery_init(void)
|
module_platform_driver(da903x_battery_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&da903x_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void da903x_battery_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&da903x_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(da903x_battery_init);
|
|
||||||
module_exit(da903x_battery_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("DA9030 battery charger driver");
|
MODULE_DESCRIPTION("DA9030 battery charger driver");
|
||||||
MODULE_AUTHOR("Mike Rapoport, CompuLab");
|
MODULE_AUTHOR("Mike Rapoport, CompuLab");
|
||||||
|
@ -641,18 +641,7 @@ static struct platform_driver ds2760_battery_driver = {
|
|||||||
.resume = ds2760_battery_resume,
|
.resume = ds2760_battery_resume,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init ds2760_battery_init(void)
|
module_platform_driver(ds2760_battery_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&ds2760_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit ds2760_battery_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&ds2760_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(ds2760_battery_init);
|
|
||||||
module_exit(ds2760_battery_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>, "
|
MODULE_AUTHOR("Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>, "
|
||||||
|
@ -841,8 +841,6 @@ static int __devexit ds2780_battery_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE_ALIAS("platform:ds2780-battery");
|
|
||||||
|
|
||||||
static struct platform_driver ds2780_battery_driver = {
|
static struct platform_driver ds2780_battery_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "ds2780-battery",
|
.name = "ds2780-battery",
|
||||||
@ -851,19 +849,9 @@ static struct platform_driver ds2780_battery_driver = {
|
|||||||
.remove = __devexit_p(ds2780_battery_remove),
|
.remove = __devexit_p(ds2780_battery_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init ds2780_battery_init(void)
|
module_platform_driver(ds2780_battery_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&ds2780_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit ds2780_battery_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&ds2780_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(ds2780_battery_init);
|
|
||||||
module_exit(ds2780_battery_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Clifton Barnes <cabarnes@indesign-llc.com>");
|
MODULE_AUTHOR("Clifton Barnes <cabarnes@indesign-llc.com>");
|
||||||
MODULE_DESCRIPTION("Maxim/Dallas DS2780 Stand-Alone Fuel Gauage IC driver");
|
MODULE_DESCRIPTION("Maxim/Dallas DS2780 Stand-Alone Fuel Gauage IC driver");
|
||||||
|
MODULE_ALIAS("platform:ds2780-battery");
|
||||||
|
@ -185,17 +185,7 @@ static struct platform_driver gpio_charger_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init gpio_charger_init(void)
|
module_platform_driver(gpio_charger_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&gpio_charger_driver);
|
|
||||||
}
|
|
||||||
module_init(gpio_charger_init);
|
|
||||||
|
|
||||||
static void __exit gpio_charger_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&gpio_charger_driver);
|
|
||||||
}
|
|
||||||
module_exit(gpio_charger_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
|
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
|
||||||
MODULE_DESCRIPTION("Driver for chargers which report their online status through a GPIO");
|
MODULE_DESCRIPTION("Driver for chargers which report their online status through a GPIO");
|
||||||
|
@ -779,18 +779,7 @@ static struct platform_driver platform_pmic_battery_driver = {
|
|||||||
.remove = __devexit_p(platform_pmic_battery_remove),
|
.remove = __devexit_p(platform_pmic_battery_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init platform_pmic_battery_module_init(void)
|
module_platform_driver(platform_pmic_battery_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&platform_pmic_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit platform_pmic_battery_module_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&platform_pmic_battery_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(platform_pmic_battery_module_init);
|
|
||||||
module_exit(platform_pmic_battery_module_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Nithish Mahalingam <nithish.mahalingam@intel.com>");
|
MODULE_AUTHOR("Nithish Mahalingam <nithish.mahalingam@intel.com>");
|
||||||
MODULE_DESCRIPTION("Intel Moorestown PMIC Battery Driver");
|
MODULE_DESCRIPTION("Intel Moorestown PMIC Battery Driver");
|
||||||
|
@ -494,17 +494,7 @@ static struct platform_driver isp1704_charger_driver = {
|
|||||||
.remove = __devexit_p(isp1704_charger_remove),
|
.remove = __devexit_p(isp1704_charger_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init isp1704_charger_init(void)
|
module_platform_driver(isp1704_charger_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&isp1704_charger_driver);
|
|
||||||
}
|
|
||||||
module_init(isp1704_charger_init);
|
|
||||||
|
|
||||||
static void __exit isp1704_charger_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&isp1704_charger_driver);
|
|
||||||
}
|
|
||||||
module_exit(isp1704_charger_exit);
|
|
||||||
|
|
||||||
MODULE_ALIAS("platform:isp1704_charger");
|
MODULE_ALIAS("platform:isp1704_charger");
|
||||||
MODULE_AUTHOR("Nokia Corporation");
|
MODULE_AUTHOR("Nokia Corporation");
|
||||||
|
@ -441,17 +441,7 @@ static struct platform_driver jz_battery_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init jz_battery_init(void)
|
module_platform_driver(jz_battery_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&jz_battery_driver);
|
|
||||||
}
|
|
||||||
module_init(jz_battery_init);
|
|
||||||
|
|
||||||
static void __exit jz_battery_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&jz_battery_driver);
|
|
||||||
}
|
|
||||||
module_exit(jz_battery_exit);
|
|
||||||
|
|
||||||
MODULE_ALIAS("platform:jz4740-battery");
|
MODULE_ALIAS("platform:jz4740-battery");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
@ -374,17 +374,7 @@ static struct platform_driver max8903_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init max8903_init(void)
|
module_platform_driver(max8903_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&max8903_driver);
|
|
||||||
}
|
|
||||||
module_init(max8903_init);
|
|
||||||
|
|
||||||
static void __exit max8903_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&max8903_driver);
|
|
||||||
}
|
|
||||||
module_exit(max8903_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_DESCRIPTION("MAX8903 Charger Driver");
|
MODULE_DESCRIPTION("MAX8903 Charger Driver");
|
||||||
|
@ -523,17 +523,7 @@ static struct platform_driver max8925_power_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init max8925_power_init(void)
|
module_platform_driver(max8925_power_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&max8925_power_driver);
|
|
||||||
}
|
|
||||||
module_init(max8925_power_init);
|
|
||||||
|
|
||||||
static void __exit max8925_power_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&max8925_power_driver);
|
|
||||||
}
|
|
||||||
module_exit(max8925_power_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_DESCRIPTION("Power supply driver for MAX8925");
|
MODULE_DESCRIPTION("Power supply driver for MAX8925");
|
||||||
|
@ -204,17 +204,7 @@ static struct platform_driver max8998_battery_driver = {
|
|||||||
.id_table = max8998_battery_id,
|
.id_table = max8998_battery_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init max8998_battery_init(void)
|
module_platform_driver(max8998_battery_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&max8998_battery_driver);
|
|
||||||
}
|
|
||||||
module_init(max8998_battery_init);
|
|
||||||
|
|
||||||
static void __exit max8998_battery_cleanup(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&max8998_battery_driver);
|
|
||||||
}
|
|
||||||
module_exit(max8998_battery_cleanup);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("MAXIM 8998 battery control driver");
|
MODULE_DESCRIPTION("MAXIM 8998 battery control driver");
|
||||||
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
|
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
|
||||||
|
@ -630,17 +630,7 @@ static struct platform_driver olpc_battery_driver = {
|
|||||||
.suspend = olpc_battery_suspend,
|
.suspend = olpc_battery_suspend,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init olpc_bat_init(void)
|
module_platform_driver(olpc_battery_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&olpc_battery_driver);
|
|
||||||
}
|
|
||||||
module_init(olpc_bat_init);
|
|
||||||
|
|
||||||
static void __exit olpc_bat_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&olpc_battery_driver);
|
|
||||||
}
|
|
||||||
module_exit(olpc_bat_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
|
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
@ -474,17 +474,7 @@ static struct platform_driver pcf50633_mbc_driver = {
|
|||||||
.remove = __devexit_p(pcf50633_mbc_remove),
|
.remove = __devexit_p(pcf50633_mbc_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init pcf50633_mbc_init(void)
|
module_platform_driver(pcf50633_mbc_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&pcf50633_mbc_driver);
|
|
||||||
}
|
|
||||||
module_init(pcf50633_mbc_init);
|
|
||||||
|
|
||||||
static void __exit pcf50633_mbc_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&pcf50633_mbc_driver);
|
|
||||||
}
|
|
||||||
module_exit(pcf50633_mbc_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Balaji Rao <balajirrao@openmoko.org>");
|
MODULE_AUTHOR("Balaji Rao <balajirrao@openmoko.org>");
|
||||||
MODULE_DESCRIPTION("PCF50633 mbc driver");
|
MODULE_DESCRIPTION("PCF50633 mbc driver");
|
||||||
|
@ -498,8 +498,6 @@ static int pda_power_resume(struct platform_device *pdev)
|
|||||||
#define pda_power_resume NULL
|
#define pda_power_resume NULL
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
MODULE_ALIAS("platform:pda-power");
|
|
||||||
|
|
||||||
static struct platform_driver pda_power_pdrv = {
|
static struct platform_driver pda_power_pdrv = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "pda-power",
|
.name = "pda-power",
|
||||||
@ -510,17 +508,8 @@ static struct platform_driver pda_power_pdrv = {
|
|||||||
.resume = pda_power_resume,
|
.resume = pda_power_resume,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init pda_power_init(void)
|
module_platform_driver(pda_power_pdrv);
|
||||||
{
|
|
||||||
return platform_driver_register(&pda_power_pdrv);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit pda_power_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&pda_power_pdrv);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(pda_power_init);
|
|
||||||
module_exit(pda_power_exit);
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
|
MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
|
||||||
|
MODULE_ALIAS("platform:pda-power");
|
||||||
|
@ -421,17 +421,7 @@ static struct platform_driver s3c_adc_bat_driver = {
|
|||||||
.resume = s3c_adc_bat_resume,
|
.resume = s3c_adc_bat_resume,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init s3c_adc_bat_init(void)
|
module_platform_driver(s3c_adc_bat_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&s3c_adc_bat_driver);
|
|
||||||
}
|
|
||||||
module_init(s3c_adc_bat_init);
|
|
||||||
|
|
||||||
static void __exit s3c_adc_bat_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&s3c_adc_bat_driver);
|
|
||||||
}
|
|
||||||
module_exit(s3c_adc_bat_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Vasily Khoruzhick <anarsoul@gmail.com>");
|
MODULE_AUTHOR("Vasily Khoruzhick <anarsoul@gmail.com>");
|
||||||
MODULE_DESCRIPTION("iPAQ H1930/H1940/RX1950 battery controller driver");
|
MODULE_DESCRIPTION("iPAQ H1930/H1940/RX1950 battery controller driver");
|
||||||
|
@ -438,18 +438,7 @@ static struct platform_driver tosa_bat_driver = {
|
|||||||
.resume = tosa_bat_resume,
|
.resume = tosa_bat_resume,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init tosa_bat_init(void)
|
module_platform_driver(tosa_bat_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&tosa_bat_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit tosa_bat_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&tosa_bat_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(tosa_bat_init);
|
|
||||||
module_exit(tosa_bat_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Dmitry Baryshkov");
|
MODULE_AUTHOR("Dmitry Baryshkov");
|
||||||
|
@ -226,17 +226,7 @@ static struct platform_driver wm831x_backup_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init wm831x_backup_init(void)
|
module_platform_driver(wm831x_backup_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&wm831x_backup_driver);
|
|
||||||
}
|
|
||||||
module_init(wm831x_backup_init);
|
|
||||||
|
|
||||||
static void __exit wm831x_backup_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&wm831x_backup_driver);
|
|
||||||
}
|
|
||||||
module_exit(wm831x_backup_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Backup battery charger driver for WM831x PMICs");
|
MODULE_DESCRIPTION("Backup battery charger driver for WM831x PMICs");
|
||||||
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
|
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
|
||||||
|
@ -655,17 +655,7 @@ static struct platform_driver wm831x_power_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init wm831x_power_init(void)
|
module_platform_driver(wm831x_power_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&wm831x_power_driver);
|
|
||||||
}
|
|
||||||
module_init(wm831x_power_init);
|
|
||||||
|
|
||||||
static void __exit wm831x_power_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&wm831x_power_driver);
|
|
||||||
}
|
|
||||||
module_exit(wm831x_power_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Power supply driver for WM831x PMICs");
|
MODULE_DESCRIPTION("Power supply driver for WM831x PMICs");
|
||||||
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
|
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
|
||||||
|
@ -522,17 +522,7 @@ static struct platform_driver wm8350_power_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init wm8350_power_init(void)
|
module_platform_driver(wm8350_power_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&wm8350_power_driver);
|
|
||||||
}
|
|
||||||
module_init(wm8350_power_init);
|
|
||||||
|
|
||||||
static void __exit wm8350_power_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&wm8350_power_driver);
|
|
||||||
}
|
|
||||||
module_exit(wm8350_power_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_DESCRIPTION("Power supply driver for WM8350");
|
MODULE_DESCRIPTION("Power supply driver for WM8350");
|
||||||
|
@ -291,18 +291,7 @@ static struct platform_driver wm97xx_bat_driver = {
|
|||||||
.remove = __devexit_p(wm97xx_bat_remove),
|
.remove = __devexit_p(wm97xx_bat_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init wm97xx_bat_init(void)
|
module_platform_driver(wm97xx_bat_driver);
|
||||||
{
|
|
||||||
return platform_driver_register(&wm97xx_bat_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit wm97xx_bat_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&wm97xx_bat_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(wm97xx_bat_init);
|
|
||||||
module_exit(wm97xx_bat_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
|
MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
|
||||||
|
Loading…
Reference in New Issue
Block a user