fix building issues of 64-bit targets
Just change the 'data' field of gralloc_drm_handle_t
to be a pointer to struct gralloc_drm_bo_t.
Fix some warnings as well.
diff --git a/gralloc_drm.c b/gralloc_drm.c
index bd38d57..31ac988 100644
--- a/gralloc_drm.c
+++ b/gralloc_drm.c
@@ -211,10 +211,10 @@
}
handle->data_owner = gralloc_drm_get_pid();
- handle->data = (int) bo;
+ handle->data = bo;
}
- return (struct gralloc_drm_bo_t *) handle->data;
+ return handle->data;
}
/*
@@ -296,7 +296,7 @@
bo->refcount = 1;
handle->data_owner = gralloc_drm_get_pid();
- handle->data = (int) bo;
+ handle->data = bo;
return bo;
}
@@ -365,7 +365,7 @@
uint32_t *pitches, uint32_t *offsets, uint32_t *handles)
{
struct gralloc_drm_handle_t *handle = gralloc_drm_handle(_handle);
- struct gralloc_drm_bo_t *bo = (struct gralloc_drm_bo_t *) handle->data;
+ struct gralloc_drm_bo_t *bo = handle->data;
struct gralloc_drm_t *drm = bo->drm;
/* if handle exists and driver implements resolve_format */