* [PATCH 0/2] mmc: omap_hsmmc: checkpatch cleanup
@ 2014-02-28 14:22 Balaji T K
2014-02-28 14:22 ` [PATCH 1/2] mmc: omap_hsmmc: fix return error code for of_get_hsmmc_pdata Balaji T K
2014-02-28 14:22 ` [PATCH 2/2] mmc: omap_hsmmc: remove redundant reset done Balaji T K
0 siblings, 2 replies; 3+ messages in thread
From: Balaji T K @ 2014-02-28 14:22 UTC (permalink / raw)
To: linux-mmc, chris; +Cc: linux-omap, Balaji T K
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(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] mmc: omap_hsmmc: fix return error code for of_get_hsmmc_pdata
2014-02-28 14:22 [PATCH 0/2] mmc: omap_hsmmc: checkpatch cleanup Balaji T K
@ 2014-02-28 14:22 ` Balaji T K
2014-02-28 14:22 ` [PATCH 2/2] mmc: omap_hsmmc: remove redundant reset done Balaji T K
1 sibling, 0 replies; 3+ messages in thread
From: Balaji T K @ 2014-02-28 14:22 UTC (permalink / raw)
To: linux-mmc, chris; +Cc: linux-omap, Balaji T K
of_get_hsmmc_pdata returns a pointer, returning NULL is invalid,
return ERR_PTR for error case.
Signed-off-by: Balaji T K <balajitk@ti.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/mmc/host/omap_hsmmc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 014bfe5..7d03d36 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -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
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] mmc: omap_hsmmc: remove redundant reset done
2014-02-28 14:22 [PATCH 0/2] mmc: omap_hsmmc: checkpatch cleanup Balaji T K
2014-02-28 14:22 ` [PATCH 1/2] mmc: omap_hsmmc: fix return error code for of_get_hsmmc_pdata Balaji T K
@ 2014-02-28 14:22 ` Balaji T K
1 sibling, 0 replies; 3+ messages in thread
From: Balaji T K @ 2014-02-28 14:22 UTC (permalink / raw)
To: linux-mmc, chris; +Cc: linux-omap, Balaji T K
Remove redundant reset done check since omap hwmod layer ensures IP reset.
Signed-off-by: Balaji T K <balajitk@ti.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/mmc/host/omap_hsmmc.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 7d03d36..f9595b9 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -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) &&
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-28 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 14:22 [PATCH 0/2] mmc: omap_hsmmc: checkpatch cleanup Balaji T K
2014-02-28 14:22 ` [PATCH 1/2] mmc: omap_hsmmc: fix return error code for of_get_hsmmc_pdata Balaji T K
2014-02-28 14:22 ` [PATCH 2/2] mmc: omap_hsmmc: remove redundant reset done Balaji T K
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).