From 66ee9365c5313d4a1bbb76561b3188566e44c025 Mon Sep 17 00:00:00 2001 From: Kyle Repinski Date: Tue, 17 Nov 2015 12:53:22 -0600 Subject: Update some hw_device_t structs. version_major and version_minor are deprecated. Ensure we actually set the sensor api version. --- libsensors/sensors.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libsensors') diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp index bee3f7a..fe2070e 100644 --- a/libsensors/sensors.cpp +++ b/libsensors/sensors.cpp @@ -121,8 +121,8 @@ static struct hw_module_methods_t sensors_module_methods = { struct sensors_module_t HAL_MODULE_INFO_SYM = { .common = { .tag = HARDWARE_MODULE_TAG, - .version_major = 1, - .version_minor = 0, + .module_api_version = SENSORS_MODULE_API_VERSION_0_1, + .hal_api_version = HARDWARE_HAL_API_VERSION, .id = SENSORS_HARDWARE_MODULE_ID, .name = "Samsung Sensor module", .author = "Samsung Electronic Company", @@ -395,7 +395,8 @@ static int open_sensors(const struct hw_module_t* module, memset(&dev->device, 0, sizeof(sensors_poll_device_t)); dev->device.common.tag = HARDWARE_DEVICE_TAG; - dev->device.common.version = 0; + // TODO: We can't expect this version to be supported forever... + dev->device.common.version = SENSORS_DEVICE_API_VERSION_0_1; dev->device.common.module = const_cast(module); dev->device.common.close = poll__close; dev->device.activate = poll__activate; -- cgit v1.1