aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorChen Huang <chenhuang5@huawei.com>2021-04-08 13:09:53 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-10 10:58:21 +0200
commit88adcd66108eae9d96aac7e38686a77fcb4cde24 (patch)
treeb220318c110b1fbd42f77bdd0f80c1030a17ba9c /drivers/w1
parentbinder: tell userspace to dump current backtrace when detected oneway spamming (diff)
downloadlinux-dev-88adcd66108eae9d96aac7e38686a77fcb4cde24.tar.xz
linux-dev-88adcd66108eae9d96aac7e38686a77fcb4cde24.zip
w1: ds2805: 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-1-chenhuang5@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/slaves/w1_ds2805.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/w1/slaves/w1_ds2805.c b/drivers/w1/slaves/w1_ds2805.c
index 206186db727d..6b5d12ba1b65 100644
--- a/drivers/w1/slaves/w1_ds2805.c
+++ b/drivers/w1/slaves/w1_ds2805.c
@@ -291,20 +291,7 @@ static struct w1_family w1_family_0d = {
.fops = &w1_f0d_fops,
};
-static int __init w1_f0d_init(void)
-{
- pr_info("%s()\n", __func__);
- return w1_register_family(&w1_family_0d);
-}
-
-static void __exit w1_f0d_fini(void)
-{
- pr_info("%s()\n", __func__);
- w1_unregister_family(&w1_family_0d);
-}
-
-module_init(w1_f0d_init);
-module_exit(w1_f0d_fini);
+module_w1_family(w1_family_0d);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Andrew Worsley amworsley@gmail.com");