Sensors: MultiHal: fix naming and compiler warning
am: a889c09
* commit 'a889c0915af205d7af1a8032e54b5a4d4496babb':
Sensors: MultiHal: fix naming and compiler warning
Change-Id: I6e54703cb9fd52a3660d3219e579839b0d5ac584
This commit is contained in:
commit
b6a6f6e20a
2 changed files with 15 additions and 15 deletions
|
@ -20,7 +20,7 @@ ifeq ($(USE_SENSOR_MULTI_HAL),true)
|
|||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_MODULE := sensors.$(TARGET_DEVICE)
|
||||
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ void sensors_poll_context_t::addSubHwDevice(struct hw_device_t* sub_hw_device) {
|
|||
// Returns the device pointer, or NULL if the global handle is invalid.
|
||||
sensors_poll_device_t* sensors_poll_context_t::get_v0_device_by_handle(int global_handle) {
|
||||
int sub_index = get_module_index(global_handle);
|
||||
if (sub_index < 0 || sub_index >= this->sub_hw_devices.size()) {
|
||||
if (sub_index < 0 || sub_index >= (int) this->sub_hw_devices.size()) {
|
||||
return NULL;
|
||||
}
|
||||
return (sensors_poll_device_t*) this->sub_hw_devices[sub_index];
|
||||
|
@ -237,7 +237,7 @@ sensors_poll_device_t* sensors_poll_context_t::get_v0_device_by_handle(int globa
|
|||
// Returns the device pointer, or NULL if the global handle is invalid.
|
||||
sensors_poll_device_1_t* sensors_poll_context_t::get_v1_device_by_handle(int global_handle) {
|
||||
int sub_index = get_module_index(global_handle);
|
||||
if (sub_index < 0 || sub_index >= this->sub_hw_devices.size()) {
|
||||
if (sub_index < 0 || sub_index >= (int) this->sub_hw_devices.size()) {
|
||||
return NULL;
|
||||
}
|
||||
return (sensors_poll_device_1_t*) this->sub_hw_devices[sub_index];
|
||||
|
@ -605,22 +605,22 @@ static int module__get_sensors_list(__unused struct sensors_module_t* module,
|
|||
}
|
||||
|
||||
static struct hw_module_methods_t sensors_module_methods = {
|
||||
open : open_sensors
|
||||
.open = open_sensors
|
||||
};
|
||||
|
||||
struct sensors_module_t HAL_MODULE_INFO_SYM = {
|
||||
common :{
|
||||
tag : HARDWARE_MODULE_TAG,
|
||||
version_major : 1,
|
||||
version_minor : 1,
|
||||
id : SENSORS_HARDWARE_MODULE_ID,
|
||||
name : "MultiHal Sensor Module",
|
||||
author : "Google, Inc",
|
||||
methods : &sensors_module_methods,
|
||||
dso : NULL,
|
||||
reserved : {0},
|
||||
.common = {
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.version_major = 1,
|
||||
.version_minor = 1,
|
||||
.id = SENSORS_HARDWARE_MODULE_ID,
|
||||
.name = "MultiHal Sensor Module",
|
||||
.author = "Google, Inc",
|
||||
.methods = &sensors_module_methods,
|
||||
.dso = NULL,
|
||||
.reserved = {0},
|
||||
},
|
||||
get_sensors_list : module__get_sensors_list
|
||||
.get_sensors_list = module__get_sensors_list
|
||||
};
|
||||
|
||||
static int open_sensors(const struct hw_module_t* hw_module, const char* name,
|
||||
|
|
Loading…
Reference in a new issue