Patchwork [5/7] mtd: nand: pxa3xx: Use clk_prepare_enable and clk_disable_unprepare

login
register
mail settings
Submitter Ezequiel Garcia
Date April 17, 2013, 4:38 p.m.
Message ID <1366216694-2365-6-git-send-email-ezequiel.garcia@free-electrons.com>
Download mbox | patch
Permalink /patch/237290/
State New
Headers show

Comments

Ezequiel Garcia - April 17, 2013, 4:38 p.m.
This patch converts the module to use clk_prepare_enable and
clk_disable_unprepare variants as required by common clock framework.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 drivers/mtd/nand/pxa3xx_nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index b8af7b4..c047943 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1072,7 +1072,7 @@  static int alloc_nand_resource(struct platform_device *pdev)
 		dev_err(&pdev->dev, "failed to get nand clock\n");
 		return PTR_ERR(info->clk);
 	}
-	clk_enable(info->clk);
+	clk_prepare_enable(info->clk);
 
 	/*
 	 * This is a dirty hack to make this driver work from devicetree
@@ -1142,7 +1142,7 @@  fail_free_buf:
 	} else
 		kfree(info->data_buff);
 fail_disable_clk:
-	clk_disable(info->clk);
+	clk_disable_unprepare(info->clk);
 	return ret;
 }
 
@@ -1168,7 +1168,7 @@  static int pxa3xx_nand_remove(struct platform_device *pdev)
 	} else
 		kfree(info->data_buff);
 
-	clk_disable(info->clk);
+	clk_disable_unprepare(info->clk);
 
 	for (cs = 0; cs < pdata->num_cs; cs++)
 		nand_release(info->host[cs]->mtd);