oops, sent the wrong version of this patch.  Here's the right one,
with clk_put() removed also.

Kevin




>From 40714ce314529bfc695087bc1b8b7d13794e088d Mon Sep 17 00:00:00 2001
From: Kevin Hilman <[email protected]>
Date: Mon, 13 Jul 2009 14:28:37 -0700
Subject: [PATCH 3/3] ASoC: davinci: clock pointers instead of clock names

Signed-off-by: Kevin Hilman <[email protected]>
---
 sound/soc/davinci/davinci-i2s.c   |    3 +--
 sound/soc/davinci/davinci-mcasp.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index f7330e1..89b90e2 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -528,7 +528,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)
                goto err_release_region;
        }
 
-       dev->clk = clk_get(&pdev->dev, pdata->clk_name);
+       dev->clk = pdata->clk;
        if (IS_ERR(dev->clk)) {
                ret = -ENODEV;
                goto err_free_mem;
@@ -584,7 +584,6 @@ static int davinci_i2s_remove(struct platform_device *pdev)
 
        snd_soc_unregister_dai(&davinci_i2s_dai);
        clk_disable(dev->clk);
-       clk_put(dev->clk);
        dev->clk = NULL;
        kfree(dev);
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/sound/soc/davinci/davinci-mcasp.c 
b/sound/soc/davinci/davinci-mcasp.c
index b27aab6..68e1d82 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -764,7 +764,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
        }
 
        pdata = pdev->dev.platform_data;
-       dev->clk = clk_get(&pdev->dev, pdata->clk_name);
+       dev->clk = pdata->clk;
        if (IS_ERR(dev->clk)) {
                ret = -ENODEV;
                goto err_release_region;
@@ -834,7 +834,6 @@ static int davinci_mcasp_remove(struct platform_device 
*pdev)
        snd_soc_unregister_dai(&davinci_mcasp_dai[pdev->id]);
        dev = davinci_mcasp_dai[pdev->id].private_data;
        clk_disable(dev->clk);
-       clk_put(dev->clk);
        dev->clk = NULL;
 
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- 
1.6.3.3


_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to