Commit b840bc11 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by David Woodhouse

mtd: mxc-nand: no need to check for validity of platform driver data

The probe function calls platform_set_drvdata with a valid pointer when
the probe is successful.  As mxcnd_suspend and mxcnd_resume are only
called on bound devices, platform_get_drvdata always returns non-NULL.

This fix isn't critical as the pointer is always valid so it doesn't
matter if the compiler generated code for it or not.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 17fabf15
...@@ -886,11 +886,10 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -886,11 +886,10 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
int ret = 0; int ret = 0;
DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n"); DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
if (mtd) {
ret = mtd->suspend(mtd); ret = mtd->suspend(mtd);
/* Disable the NFC clock */ /* Disable the NFC clock */
clk_disable(host->clk); clk_disable(host->clk);
}
return ret; return ret;
} }
...@@ -904,11 +903,9 @@ static int mxcnd_resume(struct platform_device *pdev) ...@@ -904,11 +903,9 @@ static int mxcnd_resume(struct platform_device *pdev)
DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n"); DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
if (mtd) { /* Enable the NFC clock */
/* Enable the NFC clock */ clk_enable(host->clk);
clk_enable(host->clk); mtd->resume(mtd);
mtd->resume(mtd);
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment