From c8f578b1c91efc11177ca03d424e42510b4507f3 Mon Sep 17 00:00:00 2001 From: toastcfh Date: Sun, 18 Dec 2011 19:51:58 -0500 Subject: [PATCH] libgenlock: clean up kernel includes and make USE_GENLOCK a BoardConfig option. this fixes issues with devices not yet supporting the genlock API in in kernel space. Change-Id: I734d8db95f7030c1492122283d76e81ca5fb8aa2 --- libgenlock/Android.mk | 7 +++++-- libgenlock/genlock.cpp | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libgenlock/Android.mk b/libgenlock/Android.mk index d8a3dfe..2ac565e 100644 --- a/libgenlock/Android.mk +++ b/libgenlock/Android.mk @@ -4,12 +4,15 @@ include $(CLEAR_VARS) LOCAL_PRELINK_MODULE := false LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES) LOCAL_SHARED_LIBRARIES := liblog libcutils -LOCAL_C_INCLUDES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc -LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr LOCAL_SRC_FILES := genlock.cpp LOCAL_CFLAGS:= -DLOG_TAG=\"libgenlock\" LOCAL_MODULE_TAGS := optional + +ifeq ($(BOARD_USES_GENLOCK),true) + LOCAL_CFLAGS += -DUSE_GENLOCK +endif + LOCAL_MODULE := libgenlock include $(BUILD_SHARED_LIBRARY) diff --git a/libgenlock/genlock.cpp b/libgenlock/genlock.cpp index 37bcc0e..2aa709a 100644 --- a/libgenlock/genlock.cpp +++ b/libgenlock/genlock.cpp @@ -38,10 +38,6 @@ #define GENLOCK_DEVICE "/dev/genlock" -#ifndef USE_GENLOCK -#define USE_GENLOCK -#endif - namespace { /* Internal function to map the userspace locks to the kernel lock types */ int get_kernel_lock_type(genlock_lock_type lockType)