From 493d92c15e654cc3b69ffc7b6bbcedd2ffe08525 Mon Sep 17 00:00:00 2001 From: Arne Coucheron Date: Wed, 8 Oct 2014 18:14:00 +0200 Subject: camera: Update HAL API versions and fix warning Change-Id: I556de89bc77aa070978f19e9678d985f628b69b6 --- camerawrapper/CameraWrapper.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/camerawrapper/CameraWrapper.cpp b/camerawrapper/CameraWrapper.cpp index f9ff088..ea33c48 100644 --- a/camerawrapper/CameraWrapper.cpp +++ b/camerawrapper/CameraWrapper.cpp @@ -45,23 +45,26 @@ static int camera_get_number_of_cameras(void); static int camera_get_camera_info(int camera_id, struct camera_info *info); static struct hw_module_methods_t camera_module_methods = { - open: camera_device_open + .open = camera_device_open, }; camera_module_t HAL_MODULE_INFO_SYM = { - common: { - tag: HARDWARE_MODULE_TAG, - version_major: 1, - version_minor: 0, - id: CAMERA_HARDWARE_MODULE_ID, - name: "Espresso Camera Wrapper", - author: "The CyanogenMod Project", - methods: &camera_module_methods, - dso: NULL, /* remove compilation warnings */ - reserved: {0}, /* remove compilation warnings */ + .common = { + .tag = HARDWARE_MODULE_TAG, + .module_api_version = CAMERA_MODULE_API_VERSION_1_0, + .hal_api_version = HARDWARE_HAL_API_VERSION, + .id = CAMERA_HARDWARE_MODULE_ID, + .name = "Espresso Camera Wrapper", + .author = "The CyanogenMod Project", + .methods = &camera_module_methods, + .dso = NULL, /* remove compilation warnings */ + .reserved = {0}, /* remove compilation warnings */ }, - get_number_of_cameras: camera_get_number_of_cameras, - get_camera_info: camera_get_camera_info, + .get_number_of_cameras = camera_get_number_of_cameras, + .get_camera_info = camera_get_camera_info, + .set_callbacks = NULL, /* remove compilation warnings */ + .get_vendor_tag_ops = NULL, /* remove compilation warnings */ + .reserved = {0}, /* remove compilation warnings */ }; typedef struct wrapper_camera_device { @@ -500,7 +503,7 @@ int camera_device_open(const hw_module_t* module, const char* name, memset(camera_ops, 0, sizeof(*camera_ops)); camera_device->base.common.tag = HARDWARE_DEVICE_TAG; - camera_device->base.common.version = 0; + camera_device->base.common.version = CAMERA_DEVICE_API_VERSION_1_0; camera_device->base.common.module = (hw_module_t *)(module); camera_device->base.common.close = camera_device_close; camera_device->base.ops = camera_ops; -- cgit v1.1