mtd: nand: pxa3xx: Use clk_prepare_enable and clk_disable_unprepare
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Wed, 17 Apr 2013 16:38:12 +0000 (13:38 -0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 5 Aug 2013 19:47:42 +0000 (20:47 +0100)
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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/pxa3xx_nand.c

index 188358136970a332e39f2e43a51a4452ed6d2fe6..1c03f9c73f8dec0807091867229b309b5125065c 100644 (file)
@@ -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);