On Thu, Jul 14, 2011 at 11:35 PM, Amit Daniel Kachhap amit.kachhap@linaro.org wrote:
This patch disables pci related measurement which is not needed for ARM platforms and also library libpci is not needed.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@linaro.org
Android.mk | 7 ++++++- devices/runtime_pm.cpp | 3 ++- lib.cpp | 7 ++++--- main.cpp | 6 ++++++ tuning/runtime.cpp | 2 ++ 5 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/Android.mk b/Android.mk index 146f57a..6948011 100644 --- a/Android.mk +++ b/Android.mk @@ -4,7 +4,6 @@ include $(CLEAR_VARS) LOCAL_MODULE_TAGS := debug LOCAL_SHARED_LIBRARIES := libstlport \ libnl \
- libpci \
LOCAL_MODULE := powertop
@@ -14,6 +13,12 @@ LOCAL_CPPFLAGS += -DDISABLE_NCURSES -DDISABLE_I18N -DDISABLE_TRYCATCH
LOCAL_C_INCLUDES += external/stlport/stlport/ external/stlport/stlport/stl external/stlport/stlport/using/h/ bionic external/libnl/include/
+ifneq ($(TARGET_ARCH),arm) +LOCAL_SHARED_LIBRARIES += libpci +else #TARGET_ARCH != arm +LOCAL_CPPFLAGS += -DDISABLE_PCI +endif #TARGET_ARCH == arm
should probably not use #ifdef ARM but something like #ifdef HAVE_LIBPCI instead.. there will be other architectures that don't have libpci as well.
LOCAL_SRC_FILES += \ parameters/parameters.cpp \ parameters/persistent.cpp \ diff --git a/devices/runtime_pm.cpp b/devices/runtime_pm.cpp index 368d995..5a55426 100644 --- a/devices/runtime_pm.cpp +++ b/devices/runtime_pm.cpp @@ -200,7 +200,7 @@ static void do_bus(const char *bus) continue;
dev = new class runtime_pmdevice(entry->d_name, filename);
+#ifndef DISABLE_PCI
I'd prefer a nice HAVE_LIBPCI here instead as well for the rest of these...