projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03c95e5
)
eeprom: ee1004: use module_i2c_driver to simplify the code
author
Liu Shixin
<liushixin2@huawei.com>
Fri, 18 Sep 2020 03:02:25 +0000
(11:02 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 2 Oct 2020 09:36:37 +0000
(11:36 +0200)
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>
drivers/misc/eeprom/ee1004.c
patch
|
blob
|
history
diff --git
a/drivers/misc/eeprom/ee1004.c
b/drivers/misc/eeprom/ee1004.c
index b081c67416d774969fbcfbdf21d027fdbdc6bd51..252e15ba65e111c0595dc2683dec25620cfb5f3a 100644
(file)
--- 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");