Skip to contentSkip to conversation

mmc: sdhci-iproc: fix oops in sdhci_iproc_writew

PATCH Applied Dmitry Torokhov 2 participants 2 messages Mar 13, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sdhci-iproc: fix oops in sdhci_iproc_writew

The driver co-allocates sdhci_iproc_host with sdhci_pltfm_host and so to access it we need to use sdhci_pltfm_priv() and not pltfm_host->priv.

---
 drivers/mmc/host/sdhci-iproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-iproc.c +1 -1
index 4139d34..3b423b0 100644
@@ -97,7 +97,7 @@ static inline void sdhci_iproc_writel(struct sdhci_host *host, u32 val, int reg)
 static void sdhci_iproc_writew(struct sdhci_host *host, u16 val, int reg)
 {
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct sdhci_iproc_host *iproc_host = pltfm_host->priv;
+	struct sdhci_iproc_host *iproc_host = sdhci_pltfm_priv(pltfm_host);
 	u32 word_shift = REG_OFFSET_IN_BITS(reg);
 	u32 mask = 0xffff << word_shift;
 	u32 oldval, newval;
Signature · 5 lines
2.2.0.rc0.207.ga3a616c


-- 
Dmitry
Applied
#1 lore raw
Quoted 4 lines · Dmitry Torokhov

The driver co-allocates sdhci_iproc_host with sdhci_pltfm_host and so to access it we need to use sdhci_pltfm_priv() and not pltfm_host->priv.

Thanks, applied!

Kind regards
Uffe

Quoted 23 lines
---
 drivers/mmc/host/sdhci-iproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-iproc.c +1 -2
index 4139d34..3b423b0 100644
@@ -97,7 +97,7 @@ static inline void sdhci_iproc_writel(struct sdhci_host *host, u32 val, int reg)
 static void sdhci_iproc_writew(struct sdhci_host *host, u16 val, int reg)
 {
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-       struct sdhci_iproc_host *iproc_host = pltfm_host->priv;
+       struct sdhci_iproc_host *iproc_host = sdhci_pltfm_priv(pltfm_host);
        u32 word_shift = REG_OFFSET_IN_BITS(reg);
        u32 mask = 0xffff << word_shift;
        u32 oldval, newval;
--

2.2.0.rc0.207.ga3a616c

--
Dmitry