summaryrefslogtreecommitdiffstats
path: root/drivers/misc/eeprom
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-18 05:02:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-02 11:36:37 +0200
commit4292aa977f5eda0bce4a2c221260e7c2014cb0c2 (patch)
treeb47fddb4bed5a90609056ce20248cbf8e9e54e0c /drivers/misc/eeprom
parentvirt: vbox: simplify the return expression of vbg_input_open() (diff)
downloadlinux-4292aa977f5eda0bce4a2c221260e7c2014cb0c2.tar.xz
linux-4292aa977f5eda0bce4a2c221260e7c2014cb0c2.zip
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>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r--drivers/misc/eeprom/ee1004.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c
index b081c67416d7..252e15ba65e1 100644
--- a/drivers/misc/eeprom/ee1004.c
+++ b/drivers/misc/eeprom/ee1004.c
@@ -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");