summaryrefslogtreecommitdiffstats
path: root/drivers/w1/slaves/w1_ds28e17.c
diff options
context:
space:
mode:
authorChen Huang <chenhuang5@huawei.com>2021-04-08 15:09:54 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-10 10:58:21 +0200
commit6c00365d531163a44ce57d862883db9424bd19ab (patch)
treea4e9b93cd51be27c133623a85700e849f5461225 /drivers/w1/slaves/w1_ds28e17.c
parentw1: ds2805: Use module_w1_family to simplify the code (diff)
downloadlinux-6c00365d531163a44ce57d862883db9424bd19ab.tar.xz
linux-6c00365d531163a44ce57d862883db9424bd19ab.zip
w1: ds28e17: Use module_w1_family to simplify the code
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>
Diffstat (limited to '')
-rw-r--r--drivers/w1/slaves/w1_ds28e17.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/w1/slaves/w1_ds28e17.c b/drivers/w1/slaves/w1_ds28e17.c
index 6b00db7169ab..aed10b72fc99 100644
--- 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);