Commit f7fb862b authored by Wei Yongjun's avatar Wei Yongjun Committed by Benjamin Herrenschmidt

powerpc/windfarm: Use module_i2c_driver to simplify the code

Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 0dc3289c
...@@ -593,19 +593,7 @@ static struct i2c_driver wf_fcu_driver = { ...@@ -593,19 +593,7 @@ static struct i2c_driver wf_fcu_driver = {
.id_table = wf_fcu_id, .id_table = wf_fcu_id,
}; };
static int __init wf_fcu_init(void) module_i2c_driver(wf_fcu_driver);
{
return i2c_add_driver(&wf_fcu_driver);
}
static void __exit wf_fcu_exit(void)
{
i2c_del_driver(&wf_fcu_driver);
}
module_init(wf_fcu_init);
module_exit(wf_fcu_exit);
MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("FCU control objects for PowerMacs thermal control"); MODULE_DESCRIPTION("FCU control objects for PowerMacs thermal control");
......
...@@ -174,19 +174,7 @@ static struct i2c_driver wf_lm75_driver = { ...@@ -174,19 +174,7 @@ static struct i2c_driver wf_lm75_driver = {
.id_table = wf_lm75_id, .id_table = wf_lm75_id,
}; };
static int __init wf_lm75_sensor_init(void) module_i2c_driver(wf_lm75_driver);
{
return i2c_add_driver(&wf_lm75_driver);
}
static void __exit wf_lm75_sensor_exit(void)
{
i2c_del_driver(&wf_lm75_driver);
}
module_init(wf_lm75_sensor_init);
module_exit(wf_lm75_sensor_exit);
MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("LM75 sensor objects for PowerMacs thermal control"); MODULE_DESCRIPTION("LM75 sensor objects for PowerMacs thermal control");
......
...@@ -130,18 +130,7 @@ static struct i2c_driver wf_max6690_driver = { ...@@ -130,18 +130,7 @@ static struct i2c_driver wf_max6690_driver = {
.id_table = wf_max6690_id, .id_table = wf_max6690_id,
}; };
static int __init wf_max6690_sensor_init(void) module_i2c_driver(wf_max6690_driver);
{
return i2c_add_driver(&wf_max6690_driver);
}
static void __exit wf_max6690_sensor_exit(void)
{
i2c_del_driver(&wf_max6690_driver);
}
module_init(wf_max6690_sensor_init);
module_exit(wf_max6690_sensor_exit);
MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>"); MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
MODULE_DESCRIPTION("MAX6690 sensor objects for PowerMac thermal control"); MODULE_DESCRIPTION("MAX6690 sensor objects for PowerMac thermal control");
......
...@@ -364,18 +364,7 @@ static struct i2c_driver wf_sat_driver = { ...@@ -364,18 +364,7 @@ static struct i2c_driver wf_sat_driver = {
.id_table = wf_sat_id, .id_table = wf_sat_id,
}; };
static int __init sat_sensors_init(void) module_i2c_driver(wf_sat_driver);
{
return i2c_add_driver(&wf_sat_driver);
}
static void __exit sat_sensors_exit(void)
{
i2c_del_driver(&wf_sat_driver);
}
module_init(sat_sensors_init);
module_exit(sat_sensors_exit);
MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>"); MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
MODULE_DESCRIPTION("SMU satellite sensors for PowerMac thermal control"); MODULE_DESCRIPTION("SMU satellite sensors for PowerMac thermal control");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment