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
power_supply: Convert i2c drivers to module_i2c_driver
Factor out some boilerplate code for i2c driver registration into module_i2c_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Woogyom Kim <milo.kim@ti.com> Cc: Daniel Jeong <daniel.jeong@ti.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Peter Edwards <sweetlilmre@gmail.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Acked-by: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
This commit is contained in:
committed by
Anton Vorontsov
parent
e2c5f7db78
commit
5ff92e7ab3
@@ -290,18 +290,7 @@ static struct i2c_driver max17040_i2c_driver = {
|
||||
.resume = max17040_resume,
|
||||
.id_table = max17040_id,
|
||||
};
|
||||
|
||||
static int __init max17040_init(void)
|
||||
{
|
||||
return i2c_add_driver(&max17040_i2c_driver);
|
||||
}
|
||||
module_init(max17040_init);
|
||||
|
||||
static void __exit max17040_exit(void)
|
||||
{
|
||||
i2c_del_driver(&max17040_i2c_driver);
|
||||
}
|
||||
module_exit(max17040_exit);
|
||||
module_i2c_driver(max17040_i2c_driver);
|
||||
|
||||
MODULE_AUTHOR("Minkyu Kang <mk7.kang@samsung.com>");
|
||||
MODULE_DESCRIPTION("MAX17040 Fuel Gauge");
|
||||
|
||||
Reference in New Issue
Block a user