aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Coucheron <arco68@gmail.com>2014-10-08 18:14:00 +0200
committerAndreas <skate4life@gmx.de>2014-10-19 21:03:12 +0200
commit493d92c15e654cc3b69ffc7b6bbcedd2ffe08525 (patch)
treef067df26fb3c3523a64207d5c0fbc59334d9e4a8
parenta2298a3e0f0c87bab5b76985666933731f443b02 (diff)
downloaddevice_samsung_espressowifi-493d92c15e654cc3b69ffc7b6bbcedd2ffe08525.zip
device_samsung_espressowifi-493d92c15e654cc3b69ffc7b6bbcedd2ffe08525.tar.gz
device_samsung_espressowifi-493d92c15e654cc3b69ffc7b6bbcedd2ffe08525.tar.bz2
camera: Update HAL API versions and fix warning
Change-Id: I556de89bc77aa070978f19e9678d985f628b69b6
-rw-r--r--camerawrapper/CameraWrapper.cpp31
1 files 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;