Skip to content

Commit 4292aa9

Browse files
Liu Shixingregkh
authored andcommitted
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: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20200918030225.3902750-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 03c95e5 commit 4292aa9

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎drivers/misc/eeprom/ee1004.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,7 @@ static struct i2c_driver ee1004_driver = {
280280
.remove = ee1004_remove,
281281
.id_table = ee1004_ids,
282282
};
283-
284-
static int __init ee1004_init(void)
285-
{
286-
return i2c_add_driver(&ee1004_driver);
287-
}
288-
module_init(ee1004_init);
289-
290-
static void __exit ee1004_exit(void)
291-
{
292-
i2c_del_driver(&ee1004_driver);
293-
}
294-
module_exit(ee1004_exit);
283+
module_i2c_driver(ee1004_driver);
295284

296285
MODULE_DESCRIPTION("Driver for EE1004-compliant DDR4 SPD EEPROMs");
297286
MODULE_AUTHOR("Jean Delvare");

0 commit comments

Comments
 (0)