OSDN Git Service

soc: qcom: stop spam when IPC_LOGGING is disabled
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / platform / msm / sps / sps.c
index 1fdad2c..a8dda36 100644 (file)
@@ -2186,6 +2186,7 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props,
 
        snprintf(bam_name, sizeof(bam_name), "sps_bam_%pa_0",
                                        &bam->props.phys_addr);
+#ifdef CONFIG_IPC_LOGGING
        bam->ipc_log0 = ipc_log_context_create(SPS_IPC_LOGPAGES,
                                                        bam_name, 0);
        if (!bam->ipc_log0)
@@ -2207,7 +2208,6 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props,
        if (!bam->ipc_log2)
                SPS_ERR(sps, "%s : unable to create IPC Logging 2 for bam %pa",
                                        __func__, &bam->props.phys_addr);
-
        snprintf(bam_name, sizeof(bam_name), "sps_bam_%pa_3",
                                        &bam->props.phys_addr);
        bam->ipc_log3 = ipc_log_context_create(SPS_IPC_LOGPAGES,
@@ -2223,6 +2223,7 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props,
        if (!bam->ipc_log4)
                SPS_ERR(sps, "%s : unable to create IPC Logging 4 for bam %pa",
                                        __func__, &bam->props.phys_addr);
+#endif
 
        if (bam_props->ipc_loglevel)
                bam->ipc_loglevel = bam_props->ipc_loglevel;
@@ -3018,6 +3019,7 @@ static int __init sps_init(void)
        if (sps == NULL)
                return -ENOMEM;
 
+#ifdef CONFIG_IPC_LOGGING
        sps->ipc_log0 = ipc_log_context_create(SPS_IPC_LOGPAGES,
                                                        "sps_ipc_log0", 0);
        if (!sps->ipc_log0)
@@ -3038,6 +3040,7 @@ static int __init sps_init(void)
                                SPS_IPC_REG_DUMP_FACTOR, "sps_ipc_log4", 0);
        if (!sps->ipc_log4)
                pr_err("Failed to create IPC log4\n");
+#endif
 
        ret = platform_driver_register(&msm_sps_driver);