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>
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;
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;
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;
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);
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);
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;