diff options
author | Yunhee Seo <yuni.seo@samsung.com> | 2024-04-16 16:09:02 +0900 |
---|---|---|
committer | Yunhee Seo <yuni.seo@samsung.com> | 2024-04-16 16:09:02 +0900 |
commit | c6a298bb12b9f972adb1e64fcad782593b42929c (patch) | |
tree | f75803fc4a84c8a487482976e2231c4b3f21b4cc | |
parent | a54447a6c25f8727fabd47314544b1b327ef41ec (diff) | |
download | device-emulator-c6a298bb12b9f972adb1e64fcad782593b42929c.tar.gz device-emulator-c6a298bb12b9f972adb1e64fcad782593b42929c.tar.bz2 device-emulator-c6a298bb12b9f972adb1e64fcad782593b42929c.zip |
battery: Fix incorrect module naming
According to HAL API Prototype rule,
hal module funcs structure naming should be hal_backend_[module]_funcs.
However, the hal module name was being used incorrectly.
Actual module name is not "haptic" but "device-battery".
Change-Id: If1629874ed9a6571951d81f0fd458119816ec810
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
-rw-r--r-- | hw/battery/battery.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/battery/battery.c b/hw/battery/battery.c index b533eb7..c5a9b10 100644 --- a/hw/battery/battery.c +++ b/hw/battery/battery.c @@ -24,7 +24,7 @@ #include <linux/limits.h> #include <dirent.h> -#include <hal/hal-battery-interface.h> +#include <hal/hal-device-battery-interface.h> #include <hal/hal-common-interface.h> #include <libsyscommon/file.h> @@ -263,17 +263,17 @@ static int battery_get_current_state( static int battery_init(void **data) { - hal_backend_battery_funcs *battery_funcs; + hal_backend_device_battery_funcs *device_battery_funcs; - battery_funcs = calloc(1, sizeof(hal_backend_battery_funcs)); - if (!battery_funcs) + device_battery_funcs = calloc(1, sizeof(hal_backend_device_battery_funcs)); + if (!device_battery_funcs) return -ENOMEM; - battery_funcs->register_changed_event = battery_register_changed_event; - battery_funcs->unregister_changed_event = battery_unregister_changed_event; - battery_funcs->get_current_state = battery_get_current_state; + device_battery_funcs->register_changed_event = battery_register_changed_event; + device_battery_funcs->unregister_changed_event = battery_unregister_changed_event; + device_battery_funcs->get_current_state = battery_get_current_state; - *data = (void *)battery_funcs; + *data = (void *)device_battery_funcs; return 0; } |