From patchwork Wed May 9 11:33:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 8488 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id EB53523E9A for ; Wed, 9 May 2012 11:33:51 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id B4144A18713 for ; Wed, 9 May 2012 11:33:51 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so162549yhp.11 for ; Wed, 09 May 2012 04:33:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :x-spamscore:x-bigfish:x-forefront-antispam-report:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:x-originatororg:x-gm-message-state; bh=M34Um8IPqTmHgXefbzVi7JNTbOwWvyMNhb5o6RlHusM=; b=mlGVysZiMOj/jmuCEKg0usDqaGImOawJERnNJHoojEZBNqIOMZ6IfrbdaKE9RBbKr1 sioPJY3vZD0OJgRKAL50Iq2lTslnuUQBWF0yIeqY0dzItDhAp2cjKyQyOkT58yB+myjy vMElgYA7jWpb7tVRzm4MRwW0IfP7OIZ5/mL77Zf/sRgCZ+0pRTgNJrPWLWRY0GDIRaRp Zu7q+jslgkSC//FQiZnuFrEDzrlTX/aWdOHRl/4GPgKKc8rjxC3LfOwoNGYFp0xwOvE+ 1fv5Lgk5Q8GPNM5ysShUVx4F5its4fCenYPG/bySfY6Mx8+4gFT0Y909HRN/wpWZZ0VG bplQ== Received: by 10.50.10.225 with SMTP id l1mr12891989igb.1.1336563231354; Wed, 09 May 2012 04:33:51 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.73.147 with SMTP id q19csp8643ibj; Wed, 9 May 2012 04:33:51 -0700 (PDT) Received: by 10.50.168.106 with SMTP id zv10mr1239306igb.55.1336563230970; Wed, 09 May 2012 04:33:50 -0700 (PDT) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe006.messaging.microsoft.com. [216.32.181.186]) by mx.google.com with ESMTPS id wo10si3759910igc.30.2012.05.09.04.33.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 May 2012 04:33:50 -0700 (PDT) Received-SPF: neutral (google.com: 216.32.181.186 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) client-ip=216.32.181.186; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.181.186 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) smtp.mail=B20223@freescale.com Received: from mail82-ch1-R.bigfish.com (10.43.68.237) by CH1EHSOBE014.bigfish.com (10.43.70.64) with Microsoft SMTP Server id 14.1.225.23; Wed, 9 May 2012 11:33:49 +0000 Received: from mail82-ch1 (localhost [127.0.0.1]) by mail82-ch1-R.bigfish.com (Postfix) with ESMTP id F30F82A07FD; Wed, 9 May 2012 11:33:49 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bh) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail82-ch1 (localhost.localdomain [127.0.0.1]) by mail82-ch1 (MessageSwitch) id 1336563227864937_7510; Wed, 9 May 2012 11:33:47 +0000 (UTC) Received: from CH1EHSMHS005.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.250]) by mail82-ch1.bigfish.com (Postfix) with ESMTP id CECBA40264; Wed, 9 May 2012 11:33:47 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS005.bigfish.com (10.43.70.5) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 9 May 2012 11:33:45 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.355.3; Wed, 9 May 2012 06:33:44 -0500 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id q49BXDtQ001540; Wed, 9 May 2012 06:33:40 -0500 (CDT) From: Richard Zhao To: , , CC: , , , , , , , , , , Richard Zhao Subject: [PATCH V2 06/11] ASoC: fsl_ssi: convert to use devm_clk_get Date: Wed, 9 May 2012 19:33:05 +0800 Message-ID: <1336563190-19974-7-git-send-email-richard.zhao@freescale.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1336563190-19974-1-git-send-email-richard.zhao@freescale.com> References: <1336563190-19974-1-git-send-email-richard.zhao@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Gm-Message-State: ALoCoQlv+U7v+W1rcGnq1V0DOzrNj70hOVOGy6aivVC97wxs0U5rm5DIURQfegTh+4SpS94xLfI7 Signed-off-by: Richard Zhao --- sound/soc/fsl/fsl_ssi.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 4ed2afd..b10a427 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -725,7 +725,7 @@ static int __devinit fsl_ssi_probe(struct platform_device *pdev) u32 dma_events[2]; ssi_private->ssi_on_imx = true; - ssi_private->clk = clk_get(&pdev->dev, NULL); + ssi_private->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(ssi_private->clk)) { ret = PTR_ERR(ssi_private->clk); dev_err(&pdev->dev, "could not get clock: %d\n", ret); @@ -842,10 +842,8 @@ error_dev: device_remove_file(&pdev->dev, dev_attr); error_clk: - if (ssi_private->ssi_on_imx) { + if (ssi_private->ssi_on_imx) clk_disable_unprepare(ssi_private->clk); - clk_put(ssi_private->clk); - } error_irq: free_irq(ssi_private->irq, ssi_private); @@ -871,7 +869,6 @@ static int fsl_ssi_remove(struct platform_device *pdev) if (ssi_private->ssi_on_imx) { platform_device_unregister(ssi_private->imx_pcm_pdev); clk_disable_unprepare(ssi_private->clk); - clk_put(ssi_private->clk); } snd_soc_unregister_dai(&pdev->dev); device_remove_file(&pdev->dev, &ssi_private->dev_attr);