thermal: rename device_thermal_e to hal_device_thermal_e 43/262043/1 accepted/tizen/6.5/unified/20211028.114915 accepted/tizen/unified/20210804.085622 submit/tizen/20210802.064402 submit/tizen/20210805.103313 submit/tizen/20210817.044914 submit/tizen_6.5/20211028.163201 tizen_6.5.m2_release
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 2 Aug 2021 05:08:37 +0000 (14:08 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 2 Aug 2021 05:12:20 +0000 (14:12 +0900)
The enum device_thermal_e has also been declared in device-api header.
Therefore, in implementing direct hal api, this enumerator makes error
(redeclaration of enumerator). Rename device_thermal_e at hal to avoid
this error.

Change-Id: I109cc31c9f64422caa178e007bd5a8734ed36750
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
haltest/thermal.cpp
include/backend/hal-thermal-interface.h
include/hal-thermal.h
src/thermal.c

index 2d11fc5..2cb4efc 100644 (file)
@@ -54,7 +54,7 @@ TEST_F(THERMAL, GetInfoP)
                info.temp = -1;
                info.adc = -1;
 
-               ret_val = hal_device_thermal_get_info(DEVICE_THERMAL_AP, &info);
+               ret_val = hal_device_thermal_get_info(HAL_DEVICE_THERMAL_AP, &info);
                if (ret_val == -ENODEV) {
                        SKIP_MESSAGE("Not supported HAL");
                        return;
@@ -69,7 +69,7 @@ TEST_F(THERMAL, GetInfoP)
                info.temp = -1;
                info.adc = -1;
 
-               ret_val = hal_device_thermal_get_info(DEVICE_THERMAL_BATTERY, &info);
+               ret_val = hal_device_thermal_get_info(HAL_DEVICE_THERMAL_BATTERY, &info);
                if (ret_val == -ENODEV) {
                        SKIP_MESSAGE("Not supported HAL");
                        return;
index 5c33746..76fc3e6 100644 (file)
@@ -24,10 +24,10 @@ extern "C" {
 
 typedef enum
 {
-    DEVICE_THERMAL_AP,      /* AP temperature */
-    DEVICE_THERMAL_CP,      /* CP temperature */
-    DEVICE_THERMAL_BATTERY, /* Battery temperature */
-} device_thermal_e;
+    HAL_DEVICE_THERMAL_AP,      /* AP temperature */
+    HAL_DEVICE_THERMAL_CP,      /* CP temperature */
+    HAL_DEVICE_THERMAL_BATTERY, /* Battery temperature */
+} hal_device_thermal_e;
 
 struct thermal_info {
        int temp;
@@ -38,7 +38,7 @@ typedef void (*ThermalUpdated)(struct thermal_info *info, void *data);
 
 typedef struct _hal_backend_thermal_funcs {
        /* Get thermal state */
-       int (*get_info)(device_thermal_e type, struct thermal_info *info);
+       int (*get_info)(hal_device_thermal_e type, struct thermal_info *info);
 
        /* Register thermal event */
        int (*register_changed_event)(ThermalUpdated updated_cb, void *data);
index 4cd4493..f01153f 100644 (file)
@@ -27,7 +27,7 @@ extern "C" {
 
 int hal_device_thermal_get_backend(void);
 int hal_device_thermal_put_backend(void);
-int hal_device_thermal_get_info(device_thermal_e type, struct thermal_info *info);
+int hal_device_thermal_get_info(hal_device_thermal_e type, struct thermal_info *info);
 int hal_device_thermal_register_changed_event(ThermalUpdated updated_cb, void *data);
 int hal_device_thermal_unregister_changed_event(ThermalUpdated updated_cb);
 
index 70d13ed..6e056e4 100644 (file)
@@ -57,7 +57,7 @@ int hal_device_thermal_put_backend(void)
        return 0;
 }
 
-int hal_device_thermal_get_info(device_thermal_e type, struct thermal_info *info)
+int hal_device_thermal_get_info(hal_device_thermal_e type, struct thermal_info *info)
 {
        int ret;