From patchwork Wed May 21 03:22:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 30506 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7E44220C03 for ; Wed, 21 May 2014 03:24:58 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id i4sf6327291oah.9 for ; Tue, 20 May 2014 20:24:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=mrlELE+nJTgC66VctshzGYhgz/yfETA6PXtKFvtCenw=; b=VgYmCyb3/52Z6hKlc7FUJ8iCDYLoI0L9k/Uw6s3X+h1mmYpw+1r8X06fN70WyvdyGO A0j7XsPh5+wSLr8a3Z8R9jAsD4IeEwFmZyrL5rGPC52cdyrX7SUcxhqRA53etk5DxxFC Ctb1FwOJXmYDU0kKC2n6UxEE7DAHBymCNI57CkrFztUIwACTN2DsT2bZ36KxQXYCc0A5 YAvElfyrqwFt8L4Vel4I7WClX9ukyTnjugjfvCMEWehTZGbQ+nY/7bkg+teh3ZNp2gCb +6Z4nqdIvknxFgwwKvswUTYNtVeOUX5HFXGQ0L0AORZIF41DGSFbP+X//sZm+5TRr5+4 au5g== X-Gm-Message-State: ALoCoQmjDVNRcN7ecOC87XxywZiEhFO2rJXOkZK1w4tJK414AseDI3mpP6e7/4PeWEof4MBp/46T X-Received: by 10.182.128.234 with SMTP id nr10mr21692452obb.0.1400642698130; Tue, 20 May 2014 20:24:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.138 with SMTP id 10ls549254qgx.9.gmail; Tue, 20 May 2014 20:24:58 -0700 (PDT) X-Received: by 10.220.160.67 with SMTP id m3mr301908vcx.56.1400642698037; Tue, 20 May 2014 20:24:58 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id xb10si2150427vcb.45.2014.05.20.20.24.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 May 2014 20:24:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id sa20so1797174veb.27 for ; Tue, 20 May 2014 20:24:57 -0700 (PDT) X-Received: by 10.220.81.194 with SMTP id y2mr7478690vck.29.1400642697930; Tue, 20 May 2014 20:24:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp78917vcb; Tue, 20 May 2014 20:24:57 -0700 (PDT) X-Received: by 10.68.166.131 with SMTP id zg3mr23441492pbb.165.1400642696806; Tue, 20 May 2014 20:24:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tq1si4376297pbc.162.2014.05.20.20.24.56; Tue, 20 May 2014 20:24:56 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751602AbaEUDYv (ORCPT + 27 others); Tue, 20 May 2014 23:24:51 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:33827 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbaEUDYs (ORCPT ); Tue, 20 May 2014 23:24:48 -0400 Received: by mail-pd0-f182.google.com with SMTP id r10so943659pdi.27 for ; Tue, 20 May 2014 20:24:47 -0700 (PDT) X-Received: by 10.66.186.238 with SMTP id fn14mr55045764pac.135.1400642687568; Tue, 20 May 2014 20:24:47 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id pb7sm98425440pac.10.2014.05.20.20.24.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 May 2014 20:24:46 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org Cc: tiwai@suse.de, perex@perex.cz, broonie@kernel.org, lgirdwood@gmail.com, sbkim73@samsung.com, kgene.kim@samsung.com Subject: [PATCH 4/4] ASoC: samsung: Add devm_clk_get to pcm.c Date: Wed, 21 May 2014 08:52:20 +0530 Message-Id: <1400642540-24375-5-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400642540-24375-1-git-send-email-tushar.behera@linaro.org> References: <1400642540-24375-1-git-send-email-tushar.behera@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , clk_get in probe function can be safely replaced with devm_clk_get. Signed-off-by: Tushar Behera --- sound/soc/samsung/pcm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 90fcd52..a3c9c9c 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -542,7 +542,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) /* Default is 128fs */ pcm->sclk_per_fs = 128; - pcm->cclk = clk_get(&pdev->dev, "audio-bus"); + pcm->cclk = devm_clk_get(&pdev->dev, "audio-bus"); if (IS_ERR(pcm->cclk)) { dev_err(&pdev->dev, "failed to get audio-bus\n"); ret = PTR_ERR(pcm->cclk); @@ -567,7 +567,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) goto err3; } - pcm->pclk = clk_get(&pdev->dev, "pcm"); + pcm->pclk = devm_clk_get(&pdev->dev, "pcm"); if (IS_ERR(pcm->pclk)) { dev_err(&pdev->dev, "failed to get pcm_clock\n"); ret = -ENOENT; @@ -605,14 +605,12 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) err5: clk_disable_unprepare(pcm->pclk); - clk_put(pcm->pclk); err4: iounmap(pcm->regs); err3: release_mem_region(mem_res->start, resource_size(mem_res)); err2: clk_disable_unprepare(pcm->cclk); - clk_put(pcm->cclk); err1: return ret; } @@ -631,8 +629,6 @@ static int s3c_pcm_dev_remove(struct platform_device *pdev) clk_disable_unprepare(pcm->cclk); clk_disable_unprepare(pcm->pclk); - clk_put(pcm->pclk); - clk_put(pcm->cclk); return 0; }