Patchwork [2/2] mxc_nand: remove unused variables

login
register
mail settings
Submitter Baruch Siach
Date Aug. 9, 2010, 11:38 a.m.
Message ID <d4b734ef5662b65466fbe959bd1fc993a7f08398.1281353601.git.baruch@tkos.co.il>
Download mbox | patch
Permalink /patch/61267/
State New
Headers show

Comments

Baruch Siach - Aug. 9, 2010, 11:38 a.m.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/mtd/nand/mxc_nand.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
Lothar Waßmann - Aug. 9, 2010, 12:34 p.m.
Hi,

Baruch Siach writes:
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  drivers/mtd/nand/mxc_nand.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index 3092240..dfa8311 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -1210,15 +1210,12 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
>  static int mxcnd_resume(struct platform_device *pdev)
>  {
>  	struct mtd_info *mtd = platform_get_drvdata(pdev);
> -	struct nand_chip *nand_chip = mtd->priv;
> -	struct mxc_nand_host *host = nand_chip->priv;
> -	int ret = 0;
>  
>  	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
>  
>  	mtd->resume(mtd);
>  
There was a patch to remove the whole function mxcnd_resume() because
the call to mtd->resume() is done elsewhere in the MTD layer:
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-June/018243.html


Lothar Waßmann

Patch

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 3092240..dfa8311 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1210,15 +1210,12 @@  static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 static int mxcnd_resume(struct platform_device *pdev)
 {
 	struct mtd_info *mtd = platform_get_drvdata(pdev);
-	struct nand_chip *nand_chip = mtd->priv;
-	struct mxc_nand_host *host = nand_chip->priv;
-	int ret = 0;
 
 	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
 
 	mtd->resume(mtd);
 
-	return ret;
+	return 0;
 }
 
 #else