projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88adcd6
)
w1: ds28e17: Use module_w1_family to simplify the code
author
Chen Huang
<chenhuang5@huawei.com>
Thu, 8 Apr 2021 13:09:54 +0000
(13:09 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 10 Apr 2021 08:58:21 +0000
(10:58 +0200)
module_w1_family() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Chen Huang <chenhuang5@huawei.com>
Link:
https://lore.kernel.org/r/20210408130954.1158963-2-chenhuang5@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/slaves/w1_ds28e17.c
patch
|
blob
|
history
diff --git
a/drivers/w1/slaves/w1_ds28e17.c
b/drivers/w1/slaves/w1_ds28e17.c
index
6b00db7
..
aed10b7
100644
(file)
--- a/
drivers/w1/slaves/w1_ds28e17.c
+++ b/
drivers/w1/slaves/w1_ds28e17.c
@@
-752,18
+752,4
@@
static struct w1_family w1_family_19 = {
.fops = &w1_f19_fops,
};
-
-/* Module init and remove functions. */
-static int __init w1_f19_init(void)
-{
- return w1_register_family(&w1_family_19);
-}
-
-static void __exit w1_f19_fini(void)
-{
- w1_unregister_family(&w1_family_19);
-}
-
-module_init(w1_f19_init);
-module_exit(w1_f19_fini);
-
+module_w1_family(w1_family_19);