From 9305d274c9616724aed56e5378a9320f4076e06b Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Mon, 2 Aug 2021 14:08:37 +0900 Subject: [PATCH] thermal: rename device_thermal_e to hal_device_thermal_e 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 --- haltest/thermal.cpp | 4 ++-- include/backend/hal-thermal-interface.h | 10 +++++----- include/hal-thermal.h | 2 +- src/thermal.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/haltest/thermal.cpp b/haltest/thermal.cpp index 2d11fc5..2cb4efc 100644 --- a/haltest/thermal.cpp +++ b/haltest/thermal.cpp @@ -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; diff --git a/include/backend/hal-thermal-interface.h b/include/backend/hal-thermal-interface.h index 5c33746..76fc3e6 100644 --- a/include/backend/hal-thermal-interface.h +++ b/include/backend/hal-thermal-interface.h @@ -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); diff --git a/include/hal-thermal.h b/include/hal-thermal.h index 4cd4493..f01153f 100644 --- a/include/hal-thermal.h +++ b/include/hal-thermal.h @@ -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); diff --git a/src/thermal.c b/src/thermal.c index 70d13ed..6e056e4 100644 --- a/src/thermal.c +++ b/src/thermal.c @@ -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; -- 2.7.4