summaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-11-17 12:53:22 -0600
committerZiyan <jaraidaniel@gmail.com>2016-01-17 22:41:00 +0100
commit66ee9365c5313d4a1bbb76561b3188566e44c025 (patch)
tree763f4211d876aeeb9a4c8e993f4228a67ca576e5 /libsensors
parentcb8261e6db2a6a13ea67b1848e1cab6b0e7091ec (diff)
downloaddevice_samsung_tuna-66ee9365c5313d4a1bbb76561b3188566e44c025.zip
device_samsung_tuna-66ee9365c5313d4a1bbb76561b3188566e44c025.tar.gz
device_samsung_tuna-66ee9365c5313d4a1bbb76561b3188566e44c025.tar.bz2
Update some hw_device_t structs.
version_major and version_minor are deprecated. Ensure we actually set the sensor api version.
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/sensors.cpp7
1 files changed, 4 insertions, 3 deletions
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<hw_module_t*>(module);
dev->device.common.close = poll__close;
dev->device.activate = poll__activate;