diff options
| author | Krishna Konda <kkonda@codeaurora.org> | 2015-10-23 11:43:02 -0700 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-31 15:27:49 -0700 |
| commit | 5dad09326ec4dc0a1b9c636297c1661a9f7efbe7 (patch) | |
| tree | e8e9e1b207b1705bb800070168cc8890d339d6da | |
| parent | 6ae860507e2b7c58d9b44b608c34a3a6acf7a2c9 (diff) | |
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: Krishna Konda <kkonda@codeaurora.org>
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
| -rw-r--r-- | drivers/mmc/host/sdhci-msm.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 4848c26f4a1f..55d6537f3e76 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -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)); |
