mmc: omap_hsmmc: checkpatch cleanup
Subsystems (2)
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
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.
Signed-off-by Balaji T K <[email protected]>
Reported-by Dan Carpenter <[email protected]>
--- drivers/mmc/host/omap_hsmmc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/omap_hsmmc.c +2 -2
@@ -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
PATCH 2/2 mmc: omap_hsmmc: remove redundant reset done
In reply to Balaji T KRemove redundant reset done check since omap hwmod layer ensures IP reset.
Signed-off-by Balaji T K <[email protected]>
Reported-by Dan Carpenter <[email protected]>
--- drivers/mmc/host/omap_hsmmc.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/mmc/host/omap_hsmmc.c +0 -4
@@ -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