Skip to content

Commit

Permalink
hwmon: Use subsys_initcall
Browse files Browse the repository at this point in the history
Subsystem infrastructure should normally register with "subsys_initcall",
so that it's available to drivers that may need to initialize early.

This patch updates "hwmon" to do so.  It's common for embedded systems to
have multifunction chips with hardware monitoring interfaces, and to have
those chips be used during system bringup ... before a normal "module_init"
would kick, or maybe just linked so they'd init before hwmon.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
David Brownell authored and Jean Delvare committed Feb 14, 2007
1 parent 41be722 commit 37f54ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static void __exit hwmon_exit(void)
class_destroy(hwmon_class);
}

module_init(hwmon_init);
subsys_initcall(hwmon_init);
module_exit(hwmon_exit);

EXPORT_SYMBOL_GPL(hwmon_device_register);
Expand Down

0 comments on commit 37f54ee

Please sign in to comment.