Skip to contentSkip to conversation

mmc: omap_hsmmc: checkpatch cleanup

PATCH New Balaji T K 1 participant 3 messages Feb 28, 2014

Subsystems (2)
lore
Share & tools
lore

Balaji T K

author
#0 lore raw

cover mmc: omap_hsmmc: checkpatch cleanup

fixes for checkpatch warnings.

Balaji T K (2):
mmc: omap_hsmmc: fix return error code for of_get_hsmmc_pdata
mmc: omap_hsmmc: remove redundant reset done

 drivers/mmc/host/omap_hsmmc.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 1/2 mmc: omap_hsmmc: fix return error code for of_get_hsmmc_pdata

of_get_hsmmc_pdata returns a pointer, returning NULL is invalid, return ERR_PTR for error case.

---
 drivers/mmc/host/omap_hsmmc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/omap_hsmmc.c +2 -2
index 014bfe5..7d03d36 100644
@@ -1725,7 +1725,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
 
 	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
 	if (!pdata)
-		return NULL; /* out of memory */
+		return ERR_PTR(-ENOMEM); /* out of memory */
 
 	if (of_find_property(np, "ti,dual-volt", NULL))
 		pdata->controller_flags |= OMAP_HSMMC_SUPPORTS_DUAL_VOLT;
@@ -1760,7 +1760,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
 static inline struct omap_mmc_platform_data
 			*of_get_hsmmc_pdata(struct device *dev)
 {
-	return NULL;
+	return ERR_PTR(-EINVAL);
 }
 #endif
 
Signature · 1 line
1.7.5.4
author
#2 lore raw

PATCH 2/2 mmc: omap_hsmmc: remove redundant reset done

In reply to Balaji T K

Remove redundant reset done check since omap hwmod layer ensures IP reset.

---
 drivers/mmc/host/omap_hsmmc.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/mmc/host/omap_hsmmc.c +0 -4
index 7d03d36..f9595b9 100644
@@ -97,7 +97,6 @@
 #define SRC			(1 << 25)
 #define SRD			(1 << 26)
 #define SOFTRESET		(1 << 1)
-#define RESETDONE		(1 << 0)
 
 /* Interrupt masks for IE and ISE register */
 #define CC_EN			(1 << 0)
@@ -627,9 +626,6 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
 	u32 hctl, capa;
 	unsigned long timeout;
 
-	if (!OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE)
-		return 1;
-
 	if (host->con == OMAP_HSMMC_READ(host->base, CON) &&
 	    host->hctl == OMAP_HSMMC_READ(host->base, HCTL) &&
 	    host->sysctl == OMAP_HSMMC_READ(host->base, SYSCTL) &&
Signature · 1 line
1.7.5.4