diff options
author | Andrew F. Davis <afd@ti.com> | 2016-08-02 23:07:09 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-03 01:35:39 +0200 |
commit | 939fc832290d548a02b6a309992b3c1ff7de1ff9 (patch) | |
tree | ec7f08bea46363dc89e423c13f8a782ba3574b24 /drivers/w1/slaves/w1_ds2406.c | |
parent | w1: remove need for ida and use PLATFORM_DEVID_AUTO (diff) | |
download | linux-939fc832290d548a02b6a309992b3c1ff7de1ff9.tar.xz linux-939fc832290d548a02b6a309992b3c1ff7de1ff9.zip |
w1: add helper macro module_w1_family
The helper macro module_w1_family can be used in module drivers that
only register a w1 driver in their module init functions. Add this
macro and use it in all applicable drivers.
Link: http://lkml.kernel.org/r/20160531204313.20979-2-afd@ti.com
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/w1/slaves/w1_ds2406.c')
-rw-r--r-- | drivers/w1/slaves/w1_ds2406.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/w1/slaves/w1_ds2406.c b/drivers/w1/slaves/w1_ds2406.c index d488961a8c90..51f2f66d6555 100644 --- a/drivers/w1/slaves/w1_ds2406.c +++ b/drivers/w1/slaves/w1_ds2406.c @@ -153,16 +153,4 @@ static struct w1_family w1_family_12 = { .fid = W1_FAMILY_DS2406, .fops = &w1_f12_fops, }; - -static int __init w1_f12_init(void) -{ - return w1_register_family(&w1_family_12); -} - -static void __exit w1_f12_exit(void) -{ - w1_unregister_family(&w1_family_12); -} - -module_init(w1_f12_init); -module_exit(w1_f12_exit); +module_w1_family(w1_family_12); |