pass: thermal: Call resource monitor API directly without redundant function 12/224412/1 accepted/tizen/unified/20200214.050407 submit/tizen/20200213.105841
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 10 Feb 2020 09:56:52 +0000 (18:56 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 10 Feb 2020 10:01:54 +0000 (19:01 +0900)
get_thermal_result() is called once. It is possible to be removed
instead of calling resmon (resouce monitor) API directly without
any middle step.

Change-Id: Ib058d540056fe1a8fc7b206fb98c096272c17121
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-thermal.c

index 8e9e970ceb2cce12b5a4581f8d52b87ba9110399..4cbfccfa8b8474053c7f0f950892adb525a00bf2 100644 (file)
@@ -145,11 +145,6 @@ static int thermal_monitor_func(void *result, void *user_data)
        return 0;
 }
 
-static inline void *get_thermal_result(struct pass_resource *res)
-{
-       return pass_resmon_get_result(res, RESMON_SRC_THERMAL);
-}
-
 static int thermal_get_scenario(void *data, void *user_data)
 {
        void **scenario = data;
@@ -159,7 +154,7 @@ static int thermal_get_scenario(void *data, void *user_data)
        int ret;
 
        /* Get thermal_result raw data by reading directly */
-       thermal_result = get_thermal_result(res);
+       thermal_result = pass_resmon_get_result(res, RESMON_SRC_THERMAL);
 
        /*
         * Update thermal scenario by using both the monitored raw data