diff options
| author | Prashant Gaikwad <pgaikwad@nvidia.com> | 2012-06-05 00:29:41 -0400 |
|---|---|---|
| committer | Stephen Warren <swarren@nvidia.com> | 2012-06-12 12:32:55 -0400 |
| commit | 61c3b1971ad4c71c99919da949ac2043dfac8ee7 (patch) | |
| tree | 7cce4a814f6ddb3b2c1714f9df4af2c3cd2f1657 | |
| parent | cb53417efc726f3c243eaaeb9fce1d15bda05521 (diff) | |
staging: nvec: add clk_prepare/clk_unprepare
Use clk_prepare/clk_unprepare as required by the generic clk framework.
Cc: gregkh@linuxfoundation.org
Cc: ac100@lists.launchpad.net
Cc: devel@driverdev.osuosl.org
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Marc Dietrich <marvin24@gmx.de>
| -rw-r--r-- | drivers/staging/nvec/nvec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 3c60088871e0..9356886f489b 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c | |||
| @@ -675,7 +675,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec) | |||
| 675 | { | 675 | { |
| 676 | u32 val; | 676 | u32 val; |
| 677 | 677 | ||
| 678 | clk_enable(nvec->i2c_clk); | 678 | clk_prepare_enable(nvec->i2c_clk); |
| 679 | 679 | ||
| 680 | tegra_periph_reset_assert(nvec->i2c_clk); | 680 | tegra_periph_reset_assert(nvec->i2c_clk); |
| 681 | udelay(2); | 681 | udelay(2); |
| @@ -695,14 +695,14 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec) | |||
| 695 | 695 | ||
| 696 | enable_irq(nvec->irq); | 696 | enable_irq(nvec->irq); |
| 697 | 697 | ||
| 698 | clk_disable(nvec->i2c_clk); | 698 | clk_disable_unprepare(nvec->i2c_clk); |
| 699 | } | 699 | } |
| 700 | 700 | ||
| 701 | static void nvec_disable_i2c_slave(struct nvec_chip *nvec) | 701 | static void nvec_disable_i2c_slave(struct nvec_chip *nvec) |
| 702 | { | 702 | { |
| 703 | disable_irq(nvec->irq); | 703 | disable_irq(nvec->irq); |
| 704 | writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG); | 704 | writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG); |
| 705 | clk_disable(nvec->i2c_clk); | 705 | clk_disable_unprepare(nvec->i2c_clk); |
| 706 | } | 706 | } |
| 707 | 707 | ||
| 708 | static void nvec_power_off(void) | 708 | static void nvec_power_off(void) |
| @@ -812,7 +812,7 @@ static int __devinit tegra_nvec_probe(struct platform_device *pdev) | |||
| 812 | 812 | ||
| 813 | tegra_init_i2c_slave(nvec); | 813 | tegra_init_i2c_slave(nvec); |
| 814 | 814 | ||
| 815 | clk_enable(i2c_clk); | 815 | clk_prepare_enable(i2c_clk); |
| 816 | 816 | ||
| 817 | 817 | ||
| 818 | /* enable event reporting */ | 818 | /* enable event reporting */ |
