thermal: exynos: fix ordering in exynos_tmu_remove()
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 8 Jul 2014 13:09:56 +0000 (15:09 +0200)
committerZhang Rui <rui.zhang@intel.com>
Tue, 15 Jul 2014 14:58:32 +0000 (22:58 +0800)
It might not be a problem currently but unregister/uninitialize things
in the reverse order that they are registered/initialized.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/samsung/exynos_tmu.c

index d7ca9f49c9cb2201d41f55c4fe98f0fb04595173..6243ba03dbb477f42b293f907032d5754780d773 100644 (file)
@@ -759,10 +759,10 @@ static int exynos_tmu_remove(struct platform_device *pdev)
 {
        struct exynos_tmu_data *data = platform_get_drvdata(pdev);
 
-       exynos_tmu_control(pdev, false);
-
        exynos_unregister_thermal(data->reg_conf);
 
+       exynos_tmu_control(pdev, false);
+
        clk_unprepare(data->clk);
        if (!IS_ERR(data->clk_sec))
                clk_unprepare(data->clk_sec);