All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] w1: ds28e17: use module_w1_family to simplify the code
@ 2020-09-18  3:11 Liu Shixin
  0 siblings, 0 replies; only message in thread
From: Liu Shixin @ 2020-09-18  3:11 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: linux-kernel, Liu Shixin

module_w1_family() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/w1/slaves/w1_ds28e17.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/w1/slaves/w1_ds28e17.c b/drivers/w1/slaves/w1_ds28e17.c
index 046ddda83df9..d165aa9d803f 100644
--- a/drivers/w1/slaves/w1_ds28e17.c
+++ b/drivers/w1/slaves/w1_ds28e17.c
@@ -751,19 +751,4 @@ static struct w1_family w1_family_19 = {
 	.fid = W1_FAMILY_DS28E17,
 	.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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-18  2:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18  3:11 [PATCH -next] w1: ds28e17: use module_w1_family to simplify the code Liu Shixin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.