forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/[email protected] Signed-off-by: Andrew F. Davis <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Cc: Greg KH <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Showing
11 changed files
with
22 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,19 +138,7 @@ static struct w1_family w1_family_1d = { | |
.fid = W1_COUNTER_DS2423, | ||
.fops = &w1_f1d_fops, | ||
}; | ||
|
||
static int __init w1_f1d_init(void) | ||
{ | ||
return w1_register_family(&w1_family_1d); | ||
} | ||
|
||
static void __exit w1_f1d_exit(void) | ||
{ | ||
w1_unregister_family(&w1_family_1d); | ||
} | ||
|
||
module_init(w1_f1d_init); | ||
module_exit(w1_f1d_exit); | ||
module_w1_family(w1_family_1d); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Mika Laitio <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -288,19 +288,7 @@ static struct w1_family w1_family_2d = { | |
.fid = W1_EEPROM_DS2431, | ||
.fops = &w1_f2d_fops, | ||
}; | ||
|
||
static int __init w1_f2d_init(void) | ||
{ | ||
return w1_register_family(&w1_family_2d); | ||
} | ||
|
||
static void __exit w1_f2d_fini(void) | ||
{ | ||
w1_unregister_family(&w1_family_2d); | ||
} | ||
|
||
module_init(w1_f2d_init); | ||
module_exit(w1_f2d_fini); | ||
module_w1_family(w1_family_2d); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Bernhard Weirich <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,26 +162,13 @@ static struct w1_family w1_ds2760_family = { | |
.fid = W1_FAMILY_DS2760, | ||
.fops = &w1_ds2760_fops, | ||
}; | ||
|
||
static int __init w1_ds2760_init(void) | ||
{ | ||
pr_info("1-Wire driver for the DS2760 battery monitor chip - (c) 2004-2005, Szabolcs Gyurko\n"); | ||
return w1_register_family(&w1_ds2760_family); | ||
} | ||
|
||
static void __exit w1_ds2760_exit(void) | ||
{ | ||
w1_unregister_family(&w1_ds2760_family); | ||
} | ||
module_w1_family(w1_ds2760_family); | ||
|
||
EXPORT_SYMBOL(w1_ds2760_read); | ||
EXPORT_SYMBOL(w1_ds2760_write); | ||
EXPORT_SYMBOL(w1_ds2760_store_eeprom); | ||
EXPORT_SYMBOL(w1_ds2760_recall_eeprom); | ||
|
||
module_init(w1_ds2760_init); | ||
module_exit(w1_ds2760_exit); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Szabolcs Gyurko <[email protected]>"); | ||
MODULE_DESCRIPTION("1-wire Driver Dallas 2760 battery monitor chip"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,19 +154,7 @@ static struct w1_family w1_ds2780_family = { | |
.fid = W1_FAMILY_DS2780, | ||
.fops = &w1_ds2780_fops, | ||
}; | ||
|
||
static int __init w1_ds2780_init(void) | ||
{ | ||
return w1_register_family(&w1_ds2780_family); | ||
} | ||
|
||
static void __exit w1_ds2780_exit(void) | ||
{ | ||
w1_unregister_family(&w1_ds2780_family); | ||
} | ||
|
||
module_init(w1_ds2780_init); | ||
module_exit(w1_ds2780_exit); | ||
module_w1_family(w1_ds2780_family); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Clifton Barnes <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,19 +151,7 @@ static struct w1_family w1_ds2781_family = { | |
.fid = W1_FAMILY_DS2781, | ||
.fops = &w1_ds2781_fops, | ||
}; | ||
|
||
static int __init w1_ds2781_init(void) | ||
{ | ||
return w1_register_family(&w1_ds2781_family); | ||
} | ||
|
||
static void __exit w1_ds2781_exit(void) | ||
{ | ||
w1_unregister_family(&w1_ds2781_family); | ||
} | ||
|
||
module_init(w1_ds2781_init); | ||
module_exit(w1_ds2781_exit); | ||
module_w1_family(w1_ds2781_family); | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Renata Sayakhova <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters