ARM: tegra: thermal: Call pm register only once
Joshua Primero [Tue, 17 Jul 2012 00:09:42 +0000 (17:09 -0700)]
Fixed bug where pm register was being called multiple times.

Change-Id: I32f7b10547275e0a9bdad1073f9842589180c0f8
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/116203
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

arch/arm/mach-tegra/tegra3_thermal.c

index f36f84c..e8b5e5d 100644 (file)
@@ -441,7 +441,6 @@ int tegra_thermal_device_register(struct tegra_thermal_device *device)
                tegra_skin_device_register(device);
 #endif
 
-       register_pm_notifier(&tegra_thermal_nb);
        return 0;
 }
 
@@ -477,6 +476,8 @@ int __init tegra_thermal_init(struct tegra_thermal_data *data,
        throttle_list = tlist;
        throttle_list_size = tlist_size;
 
+       register_pm_notifier(&tegra_thermal_nb);
+
        return 0;
 }