Browse Source

hwmon: Use subsys_initcall

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>
David Brownell 18 năm trước cách đây
mục cha
commit
37f54ee546
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/hwmon/hwmon.c

+ 1 - 1
drivers/hwmon/hwmon.c

@@ -101,7 +101,7 @@ static void __exit hwmon_exit(void)
 	class_destroy(hwmon_class);
 	class_destroy(hwmon_class);
 }
 }
 
 
-module_init(hwmon_init);
+subsys_initcall(hwmon_init);
 module_exit(hwmon_exit);
 module_exit(hwmon_exit);
 
 
 EXPORT_SYMBOL_GPL(hwmon_device_register);
 EXPORT_SYMBOL_GPL(hwmon_device_register);