You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Input: convert I2C drivers to use module_i2c_driver()
This patch converts the drivers in drivers/input/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
committed by
Dmitry Torokhov
parent
ca83922e1c
commit
1b92c1cf6b
@@ -355,14 +355,4 @@ static struct i2c_driver as5011_driver = {
|
|||||||
.id_table = as5011_id,
|
.id_table = as5011_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init as5011_init(void)
|
module_i2c_driver(as5011_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&as5011_driver);
|
|
||||||
}
|
|
||||||
module_init(as5011_init);
|
|
||||||
|
|
||||||
static void __exit as5011_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&as5011_driver);
|
|
||||||
}
|
|
||||||
module_exit(as5011_exit);
|
|
||||||
|
|||||||
@@ -653,17 +653,7 @@ static struct i2c_driver adp5588_driver = {
|
|||||||
.id_table = adp5588_id,
|
.id_table = adp5588_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init adp5588_init(void)
|
module_i2c_driver(adp5588_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&adp5588_driver);
|
|
||||||
}
|
|
||||||
module_init(adp5588_init);
|
|
||||||
|
|
||||||
static void __exit adp5588_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&adp5588_driver);
|
|
||||||
}
|
|
||||||
module_exit(adp5588_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
||||||
|
|||||||
@@ -1108,17 +1108,7 @@ static struct i2c_driver adp5589_driver = {
|
|||||||
.id_table = adp5589_id,
|
.id_table = adp5589_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init adp5589_init(void)
|
module_i2c_driver(adp5589_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&adp5589_driver);
|
|
||||||
}
|
|
||||||
module_init(adp5589_init);
|
|
||||||
|
|
||||||
static void __exit adp5589_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&adp5589_driver);
|
|
||||||
}
|
|
||||||
module_exit(adp5589_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
||||||
|
|||||||
@@ -851,17 +851,7 @@ static struct i2c_driver lm8323_i2c_driver = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, lm8323_id);
|
MODULE_DEVICE_TABLE(i2c, lm8323_id);
|
||||||
|
|
||||||
static int __init lm8323_init(void)
|
module_i2c_driver(lm8323_i2c_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&lm8323_i2c_driver);
|
|
||||||
}
|
|
||||||
module_init(lm8323_init);
|
|
||||||
|
|
||||||
static void __exit lm8323_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&lm8323_i2c_driver);
|
|
||||||
}
|
|
||||||
module_exit(lm8323_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Timo O. Karjalainen <timo.o.karjalainen@nokia.com>");
|
MODULE_AUTHOR("Timo O. Karjalainen <timo.o.karjalainen@nokia.com>");
|
||||||
MODULE_AUTHOR("Daniel Stone");
|
MODULE_AUTHOR("Daniel Stone");
|
||||||
|
|||||||
@@ -316,17 +316,7 @@ static struct i2c_driver max7359_i2c_driver = {
|
|||||||
.id_table = max7359_ids,
|
.id_table = max7359_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init max7359_init(void)
|
module_i2c_driver(max7359_i2c_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&max7359_i2c_driver);
|
|
||||||
}
|
|
||||||
module_init(max7359_init);
|
|
||||||
|
|
||||||
static void __exit max7359_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&max7359_i2c_driver);
|
|
||||||
}
|
|
||||||
module_exit(max7359_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Kim Kyuwon <q1.kim@samsung.com>");
|
MODULE_AUTHOR("Kim Kyuwon <q1.kim@samsung.com>");
|
||||||
MODULE_DESCRIPTION("MAX7359 Key Switch Controller Driver");
|
MODULE_DESCRIPTION("MAX7359 Key Switch Controller Driver");
|
||||||
|
|||||||
@@ -274,18 +274,7 @@ static struct i2c_driver mcs_touchkey_driver = {
|
|||||||
.id_table = mcs_touchkey_id,
|
.id_table = mcs_touchkey_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init mcs_touchkey_init(void)
|
module_i2c_driver(mcs_touchkey_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&mcs_touchkey_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit mcs_touchkey_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&mcs_touchkey_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(mcs_touchkey_init);
|
|
||||||
module_exit(mcs_touchkey_exit);
|
|
||||||
|
|
||||||
/* Module information */
|
/* Module information */
|
||||||
MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>");
|
MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>");
|
||||||
|
|||||||
@@ -330,17 +330,7 @@ static struct i2c_driver mpr_touchkey_driver = {
|
|||||||
.remove = __devexit_p(mpr_touchkey_remove),
|
.remove = __devexit_p(mpr_touchkey_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init mpr_touchkey_init(void)
|
module_i2c_driver(mpr_touchkey_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&mpr_touchkey_driver);
|
|
||||||
}
|
|
||||||
module_init(mpr_touchkey_init);
|
|
||||||
|
|
||||||
static void __exit mpr_touchkey_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&mpr_touchkey_driver);
|
|
||||||
}
|
|
||||||
module_exit(mpr_touchkey_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Zhang Jiejing <jiejing.zhang@freescale.com>");
|
MODULE_AUTHOR("Zhang Jiejing <jiejing.zhang@freescale.com>");
|
||||||
|
|||||||
@@ -258,17 +258,7 @@ static struct i2c_driver qt1070_driver = {
|
|||||||
.remove = __devexit_p(qt1070_remove),
|
.remove = __devexit_p(qt1070_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init qt1070_init(void)
|
module_i2c_driver(qt1070_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&qt1070_driver);
|
|
||||||
}
|
|
||||||
module_init(qt1070_init);
|
|
||||||
|
|
||||||
static void __exit qt1070_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&qt1070_driver);
|
|
||||||
}
|
|
||||||
module_exit(qt1070_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Bo Shen <voice.shen@atmel.com>");
|
MODULE_AUTHOR("Bo Shen <voice.shen@atmel.com>");
|
||||||
MODULE_DESCRIPTION("Driver for AT42QT1070 QTouch sensor");
|
MODULE_DESCRIPTION("Driver for AT42QT1070 QTouch sensor");
|
||||||
|
|||||||
@@ -379,17 +379,7 @@ static struct i2c_driver qt2160_driver = {
|
|||||||
.remove = __devexit_p(qt2160_remove),
|
.remove = __devexit_p(qt2160_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init qt2160_init(void)
|
module_i2c_driver(qt2160_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&qt2160_driver);
|
|
||||||
}
|
|
||||||
module_init(qt2160_init);
|
|
||||||
|
|
||||||
static void __exit qt2160_cleanup(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&qt2160_driver);
|
|
||||||
}
|
|
||||||
module_exit(qt2160_cleanup);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Raphael Derosso Pereira <raphaelpereira@gmail.com>");
|
MODULE_AUTHOR("Raphael Derosso Pereira <raphaelpereira@gmail.com>");
|
||||||
MODULE_DESCRIPTION("Driver for AT42QT2160 Touch Sensor");
|
MODULE_DESCRIPTION("Driver for AT42QT2160 Touch Sensor");
|
||||||
|
|||||||
@@ -116,17 +116,7 @@ static struct i2c_driver ad714x_i2c_driver = {
|
|||||||
.id_table = ad714x_id,
|
.id_table = ad714x_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init ad714x_i2c_init(void)
|
module_i2c_driver(ad714x_i2c_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&ad714x_i2c_driver);
|
|
||||||
}
|
|
||||||
module_init(ad714x_i2c_init);
|
|
||||||
|
|
||||||
static void __exit ad714x_i2c_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&ad714x_i2c_driver);
|
|
||||||
}
|
|
||||||
module_exit(ad714x_i2c_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Analog Devices AD714X Capacitance Touch Sensor I2C Bus Driver");
|
MODULE_DESCRIPTION("Analog Devices AD714X Capacitance Touch Sensor I2C Bus Driver");
|
||||||
MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
|
MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
|
||||||
|
|||||||
@@ -148,17 +148,7 @@ static struct i2c_driver adxl34x_driver = {
|
|||||||
.id_table = adxl34x_id,
|
.id_table = adxl34x_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init adxl34x_i2c_init(void)
|
module_i2c_driver(adxl34x_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&adxl34x_driver);
|
|
||||||
}
|
|
||||||
module_init(adxl34x_i2c_init);
|
|
||||||
|
|
||||||
static void __exit adxl34x_i2c_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&adxl34x_driver);
|
|
||||||
}
|
|
||||||
module_exit(adxl34x_i2c_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
||||||
MODULE_DESCRIPTION("ADXL345/346 Three-Axis Digital Accelerometer I2C Bus Driver");
|
MODULE_DESCRIPTION("ADXL345/346 Three-Axis Digital Accelerometer I2C Bus Driver");
|
||||||
|
|||||||
@@ -673,19 +673,8 @@ static struct i2c_driver bma150_driver = {
|
|||||||
.remove = __devexit_p(bma150_remove),
|
.remove = __devexit_p(bma150_remove),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init BMA150_init(void)
|
module_i2c_driver(bma150_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&bma150_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit BMA150_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&bma150_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Albert Zhang <xu.zhang@bosch-sensortec.com>");
|
MODULE_AUTHOR("Albert Zhang <xu.zhang@bosch-sensortec.com>");
|
||||||
MODULE_DESCRIPTION("BMA150 driver");
|
MODULE_DESCRIPTION("BMA150 driver");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
module_init(BMA150_init);
|
|
||||||
module_exit(BMA150_exit);
|
|
||||||
|
|||||||
@@ -125,18 +125,7 @@ static struct i2c_driver cma3000_i2c_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init cma3000_i2c_init(void)
|
module_i2c_driver(cma3000_i2c_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&cma3000_i2c_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit cma3000_i2c_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&cma3000_i2c_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(cma3000_i2c_init);
|
|
||||||
module_exit(cma3000_i2c_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("CMA3000-D0x Accelerometer I2C Driver");
|
MODULE_DESCRIPTION("CMA3000-D0x Accelerometer I2C Driver");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|||||||
@@ -667,17 +667,7 @@ static struct i2c_driver kxtj9_driver = {
|
|||||||
.id_table = kxtj9_id,
|
.id_table = kxtj9_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init kxtj9_init(void)
|
module_i2c_driver(kxtj9_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&kxtj9_driver);
|
|
||||||
}
|
|
||||||
module_init(kxtj9_init);
|
|
||||||
|
|
||||||
static void __exit kxtj9_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&kxtj9_driver);
|
|
||||||
}
|
|
||||||
module_exit(kxtj9_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("KXTJ9 accelerometer driver");
|
MODULE_DESCRIPTION("KXTJ9 accelerometer driver");
|
||||||
MODULE_AUTHOR("Chris Hudson <chudson@kionix.com>");
|
MODULE_AUTHOR("Chris Hudson <chudson@kionix.com>");
|
||||||
|
|||||||
@@ -247,17 +247,7 @@ static struct i2c_driver mma8450_driver = {
|
|||||||
.id_table = mma8450_id,
|
.id_table = mma8450_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init mma8450_init(void)
|
module_i2c_driver(mma8450_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&mma8450_driver);
|
|
||||||
}
|
|
||||||
module_init(mma8450_init);
|
|
||||||
|
|
||||||
static void __exit mma8450_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&mma8450_driver);
|
|
||||||
}
|
|
||||||
module_exit(mma8450_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
|
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
|
||||||
MODULE_DESCRIPTION("MMA8450 3-Axis Accelerometer Driver");
|
MODULE_DESCRIPTION("MMA8450 3-Axis Accelerometer Driver");
|
||||||
|
|||||||
@@ -475,17 +475,7 @@ static struct i2c_driver mpu3050_i2c_driver = {
|
|||||||
.id_table = mpu3050_ids,
|
.id_table = mpu3050_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init mpu3050_init(void)
|
module_i2c_driver(mpu3050_i2c_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&mpu3050_i2c_driver);
|
|
||||||
}
|
|
||||||
module_init(mpu3050_init);
|
|
||||||
|
|
||||||
static void __exit mpu3050_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&mpu3050_i2c_driver);
|
|
||||||
}
|
|
||||||
module_exit(mpu3050_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Wistron Corp.");
|
MODULE_AUTHOR("Wistron Corp.");
|
||||||
MODULE_DESCRIPTION("MPU3050 Tri-axis gyroscope driver");
|
MODULE_DESCRIPTION("MPU3050 Tri-axis gyroscope driver");
|
||||||
|
|||||||
@@ -216,17 +216,7 @@ static struct i2c_driver pcf8574_kp_driver = {
|
|||||||
.id_table = pcf8574_kp_id,
|
.id_table = pcf8574_kp_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init pcf8574_kp_init(void)
|
module_i2c_driver(pcf8574_kp_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&pcf8574_kp_driver);
|
|
||||||
}
|
|
||||||
module_init(pcf8574_kp_init);
|
|
||||||
|
|
||||||
static void __exit pcf8574_kp_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&pcf8574_kp_driver);
|
|
||||||
}
|
|
||||||
module_exit(pcf8574_kp_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Michael Hennerich");
|
MODULE_AUTHOR("Michael Hennerich");
|
||||||
MODULE_DESCRIPTION("Keypad input driver for 16 keys connected to PCF8574");
|
MODULE_DESCRIPTION("Keypad input driver for 16 keys connected to PCF8574");
|
||||||
|
|||||||
@@ -672,18 +672,7 @@ static struct i2c_driver synaptics_i2c_driver = {
|
|||||||
.id_table = synaptics_i2c_id_table,
|
.id_table = synaptics_i2c_id_table,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init synaptics_i2c_init(void)
|
module_i2c_driver(synaptics_i2c_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&synaptics_i2c_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit synaptics_i2c_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&synaptics_i2c_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(synaptics_i2c_init);
|
|
||||||
module_exit(synaptics_i2c_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Synaptics I2C touchpad driver");
|
MODULE_DESCRIPTION("Synaptics I2C touchpad driver");
|
||||||
MODULE_AUTHOR("Mike Rapoport, Igor Grinberg, Compulab");
|
MODULE_AUTHOR("Mike Rapoport, Igor Grinberg, Compulab");
|
||||||
|
|||||||
@@ -102,17 +102,7 @@ static struct i2c_driver ad7879_i2c_driver = {
|
|||||||
.id_table = ad7879_id,
|
.id_table = ad7879_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init ad7879_i2c_init(void)
|
module_i2c_driver(ad7879_i2c_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&ad7879_i2c_driver);
|
|
||||||
}
|
|
||||||
module_init(ad7879_i2c_init);
|
|
||||||
|
|
||||||
static void __exit ad7879_i2c_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&ad7879_i2c_driver);
|
|
||||||
}
|
|
||||||
module_exit(ad7879_i2c_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
||||||
MODULE_DESCRIPTION("AD7879(-1) touchscreen I2C bus driver");
|
MODULE_DESCRIPTION("AD7879(-1) touchscreen I2C bus driver");
|
||||||
|
|||||||
@@ -1267,18 +1267,7 @@ static struct i2c_driver mxt_driver = {
|
|||||||
.id_table = mxt_id,
|
.id_table = mxt_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init mxt_init(void)
|
module_i2c_driver(mxt_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&mxt_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit mxt_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&mxt_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(mxt_init);
|
|
||||||
module_exit(mxt_exit);
|
|
||||||
|
|
||||||
/* Module information */
|
/* Module information */
|
||||||
MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>");
|
MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>");
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user