Commit 4292aa97 authored by Liu Shixin's avatar Liu Shixin Committed by Greg Kroah-Hartman

eeprom: ee1004: use module_i2c_driver to simplify the code

Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20200918030225.3902750-1-liushixin2@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 03c95e59
......@@ -280,18 +280,7 @@ static struct i2c_driver ee1004_driver = {
.remove = ee1004_remove,
.id_table = ee1004_ids,
};
static int __init ee1004_init(void)
{
return i2c_add_driver(&ee1004_driver);
}
module_init(ee1004_init);
static void __exit ee1004_exit(void)
{
i2c_del_driver(&ee1004_driver);
}
module_exit(ee1004_exit);
module_i2c_driver(ee1004_driver);
MODULE_DESCRIPTION("Driver for EE1004-compliant DDR4 SPD EEPROMs");
MODULE_AUTHOR("Jean Delvare");
......
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