Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0f016aa authored by Krishna Konda's avatar Krishna Konda Committed by Gerrit - the friendly Code Review server
Browse files

mmc: sdhci-msm: fix compilation errors



The current code has some compilation errors when compiling for
single core configurations. This fixes those errors.

Change-Id: Idd1d1bab343cf5cf1e35f229d913d16a7854f358
Signed-off-by: default avatarKrishna Konda <kkonda@codeaurora.org>
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent 7ffec40b
Loading
Loading
Loading
Loading
+24 −3
Original line number Diff line number Diff line
@@ -1432,6 +1432,15 @@ out:
	return ret;
}

#ifdef CONFIG_SMP
static inline void parse_affine_irq(struct sdhci_msm_pltfm_data *pdata)
{
	pdata->pm_qos_data.irq_req_type = PM_QOS_REQ_AFFINE_IRQ;
}
#else
static inline void parse_affine_irq(struct sdhci_msm_pltfm_data *pdata) { }
#endif

static int sdhci_msm_pm_qos_parse_irq(struct device *dev,
		struct sdhci_msm_pltfm_data *pdata)
{
@@ -1445,7 +1454,7 @@ static int sdhci_msm_pm_qos_parse_irq(struct device *dev,
	pdata->pm_qos_data.irq_req_type = PM_QOS_REQ_AFFINE_CORES;
	if (!of_property_read_string(np, "qcom,pm-qos-irq-type", &str) &&
		!strcmp(str, "affine_irq")) {
		pdata->pm_qos_data.irq_req_type = PM_QOS_REQ_AFFINE_IRQ;
		parse_affine_irq(pdata);
	}

	/* must specify cpu for "affine_cores" type */
@@ -3299,6 +3308,17 @@ out:
	return count;
}

#ifdef CONFIG_SMP
static inline void set_affine_irq(struct sdhci_msm_host *msm_host,
				struct sdhci_host *host)
{
	msm_host->pm_qos_irq.req.irq = host->irq;
}
#else
static inline void set_affine_irq(struct sdhci_msm_host *msm_host,
				struct sdhci_host *host) { }
#endif

void sdhci_msm_pm_qos_irq_init(struct sdhci_host *host)
{
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -3316,8 +3336,9 @@ void sdhci_msm_pm_qos_irq_init(struct sdhci_host *host)
	atomic_set(&msm_host->pm_qos_irq.counter, 0);
	msm_host->pm_qos_irq.req.type =
			msm_host->pdata->pm_qos_data.irq_req_type;
	if (msm_host->pm_qos_irq.req.type == PM_QOS_REQ_AFFINE_IRQ)
		msm_host->pm_qos_irq.req.irq = host->irq;
	if ((msm_host->pm_qos_irq.req.type != PM_QOS_REQ_AFFINE_CORES) &&
		(msm_host->pm_qos_irq.req.type != PM_QOS_REQ_ALL_CORES))
		set_affine_irq(msm_host, host);
	else
		cpumask_copy(&msm_host->pm_qos_irq.req.cpus_affine,
			cpumask_of(msm_host->pdata->pm_qos_data.irq_cpu));