OSDN Git Service

soc: qcom: hab: resolve some compilation issues
authorYong Ding <yongding@codeaurora.org>
Thu, 28 Jun 2018 03:09:46 +0000 (11:09 +0800)
committerYong Ding <yongding@codeaurora.org>
Thu, 28 Jun 2018 03:51:07 +0000 (11:51 +0800)
hab_qvm.h and its relevant stuffs are
only available when CONFIG_MSM_GVM_QUIN is enabled.

Change-Id: I7975f65f0f5bc627b7547c05245a37d4e6500c81
Signed-off-by: Yong Ding <yongding@codeaurora.org>
drivers/soc/qcom/hab/hab_ghs.c
drivers/soc/qcom/hab/khab_test.c

index 11fd6bb..e743d9b 100644 (file)
@@ -40,7 +40,7 @@ static const char * const dt_gipc_path_name[] = {
 };
 
 static struct ghs_vmm_plugin_info_s {
-       const char **dt_name;
+       const char * const *dt_name;
        int curr;
        int probe_cnt;
 } ghs_vmm_plugin_info = {
index 0b71054..7d6df88 100644 (file)
@@ -13,7 +13,9 @@
 #include "hab.h"
 #include "khab_test.h"
 #include "hab_pipe.h"
+#ifdef CONFIG_MSM_GVM_QUIN
 #include "hab_qvm.h"
+#endif
 #include <asm/cacheflush.h>
 #include <linux/list.h>
 
@@ -30,8 +32,10 @@ enum hab_perf_test_type {
 static int hab_shmm_throughput_test(void)
 {
        struct hab_device *habDev;
+#ifdef CONFIG_MSM_GVM_QUIN
        struct qvm_channel *dev;
-       struct hab_shared_buf *sh_buf;
+#endif
+       struct hab_shared_buf *sh_buf = NULL;
        struct physical_channel *pchan;
        struct timeval tv1, tv2;
        int i, counter;
@@ -52,6 +56,7 @@ static int hab_shmm_throughput_test(void)
 
        pchan = list_first_entry(&(habDev->pchannels),
                struct physical_channel, node);
+#ifdef CONFIG_MSM_GVM_QUIN
        dev = pchan->hyp_data;
        if (!dev) {
                ret = -EPERM;
@@ -59,6 +64,8 @@ static int hab_shmm_throughput_test(void)
        }
 
        sh_buf = dev->pipe_ep->tx_info.sh_buf;
+#endif
+
        /* pChannel is of 128k, we use 64k to test */
        size = 0x10000;