Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chen Huang and committed by
Greg Kroah-Hartman
88adcd66 a7dc1e6f

+1 -14
+1 -14
drivers/w1/slaves/w1_ds2805.c
··· 291 291 .fops = &w1_f0d_fops, 292 292 }; 293 293 294 - static int __init w1_f0d_init(void) 295 - { 296 - pr_info("%s()\n", __func__); 297 - return w1_register_family(&w1_family_0d); 298 - } 299 - 300 - static void __exit w1_f0d_fini(void) 301 - { 302 - pr_info("%s()\n", __func__); 303 - w1_unregister_family(&w1_family_0d); 304 - } 305 - 306 - module_init(w1_f0d_init); 307 - module_exit(w1_f0d_fini); 294 + module_w1_family(w1_family_0d); 308 295 309 296 MODULE_LICENSE("GPL"); 310 297 MODULE_AUTHOR("Andrew Worsley amworsley@gmail.com");