diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-04-17 07:37:56 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-05-13 23:53:24 -0400 |
commit | c0010eb5c9f1587a8831e3e7444d0d472643bf78 (patch) | |
tree | cf22402a2c6b305207ed3c1517d7ebdb2d8c9d69 /drivers/mtd/devices | |
parent | 47d0505bdba39f3bf247b5d57d94b4a5fa8ae475 (diff) |
mtd: spear_smi: Add clk_{un}prepare() support
clk_{un}prepare is mandatory for platforms using common clock framework. Since
this driver is used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for it.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/spear_smi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index 797d43cd3550..67960362681e 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c | |||
@@ -990,9 +990,9 @@ static int __devinit spear_smi_probe(struct platform_device *pdev) | |||
990 | goto err_clk; | 990 | goto err_clk; |
991 | } | 991 | } |
992 | 992 | ||
993 | ret = clk_enable(dev->clk); | 993 | ret = clk_prepare_enable(dev->clk); |
994 | if (ret) | 994 | if (ret) |
995 | goto err_clk_enable; | 995 | goto err_clk_prepare_enable; |
996 | 996 | ||
997 | ret = request_irq(irq, spear_smi_int_handler, 0, pdev->name, dev); | 997 | ret = request_irq(irq, spear_smi_int_handler, 0, pdev->name, dev); |
998 | if (ret) { | 998 | if (ret) { |
@@ -1020,8 +1020,8 @@ err_bank_setup: | |||
1020 | free_irq(irq, dev); | 1020 | free_irq(irq, dev); |
1021 | platform_set_drvdata(pdev, NULL); | 1021 | platform_set_drvdata(pdev, NULL); |
1022 | err_irq: | 1022 | err_irq: |
1023 | clk_disable(dev->clk); | 1023 | clk_disable_unprepare(dev->clk); |
1024 | err_clk_enable: | 1024 | err_clk_prepare_enable: |
1025 | clk_put(dev->clk); | 1025 | clk_put(dev->clk); |
1026 | err_clk: | 1026 | err_clk: |
1027 | iounmap(dev->io_base); | 1027 | iounmap(dev->io_base); |
@@ -1074,7 +1074,7 @@ static int __devexit spear_smi_remove(struct platform_device *pdev) | |||
1074 | irq = platform_get_irq(pdev, 0); | 1074 | irq = platform_get_irq(pdev, 0); |
1075 | free_irq(irq, dev); | 1075 | free_irq(irq, dev); |
1076 | 1076 | ||
1077 | clk_disable(dev->clk); | 1077 | clk_disable_unprepare(dev->clk); |
1078 | clk_put(dev->clk); | 1078 | clk_put(dev->clk); |
1079 | iounmap(dev->io_base); | 1079 | iounmap(dev->io_base); |
1080 | kfree(dev); | 1080 | kfree(dev); |
@@ -1091,7 +1091,7 @@ int spear_smi_suspend(struct platform_device *pdev, pm_message_t state) | |||
1091 | struct spear_smi *dev = platform_get_drvdata(pdev); | 1091 | struct spear_smi *dev = platform_get_drvdata(pdev); |
1092 | 1092 | ||
1093 | if (dev && dev->clk) | 1093 | if (dev && dev->clk) |
1094 | clk_disable(dev->clk); | 1094 | clk_disable_unprepare(dev->clk); |
1095 | 1095 | ||
1096 | return 0; | 1096 | return 0; |
1097 | } | 1097 | } |
@@ -1102,7 +1102,7 @@ int spear_smi_resume(struct platform_device *pdev) | |||
1102 | int ret = -EPERM; | 1102 | int ret = -EPERM; |
1103 | 1103 | ||
1104 | if (dev && dev->clk) | 1104 | if (dev && dev->clk) |
1105 | ret = clk_enable(dev->clk); | 1105 | ret = clk_prepare_enable(dev->clk); |
1106 | 1106 | ||
1107 | if (!ret) | 1107 | if (!ret) |
1108 | spear_smi_hw_init(dev); | 1108 | spear_smi_hw_init(dev); |