From patchwork Thu Jul 23 16:39:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 6854721 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0095BC05AC for ; Thu, 23 Jul 2015 16:40:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3430A20681 for ; Thu, 23 Jul 2015 16:40:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AC4F22067D for ; Thu, 23 Jul 2015 16:40:56 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7E50326589D; Thu, 23 Jul 2015 18:40:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 405D5261586; Thu, 23 Jul 2015 18:40:47 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8929A2658A3; Thu, 23 Jul 2015 18:40:45 +0200 (CEST) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by alsa0.perex.cz (Postfix) with ESMTP id BC51A26128B for ; Thu, 23 Jul 2015 18:39:24 +0200 (CEST) Received: by pdrg1 with SMTP id g1so159730870pdr.2 for ; Thu, 23 Jul 2015 09:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=sJZXGaaItGY4TfwUFKuEqpGDpOD5KAcKCfibLPog8Zo=; b=ZGPtceHsA/i/sv/yJIYmrMPYc9CWNLskMnxlbJcrxxkQfH4dE2WO7milUsOvwZfM2i s8EqvfvN80OGvecoSNbP7D1tvy0U69A1wwLLXtPlvi2pCqbnei1Xprtrqthh+rUeoTWN FdFvAYozVx+wLgTQEZgsgEBWbgkfcbs3rZsRxEjGwfOx48byNoVUE8Q1Vr3HMqX5MBF8 NvUL3wRVldMovkOXj12/irPmU8kOtSv0cRPoOrjSJfZkHDYP42JVJJo4oYGzM513lTZx Q+T3WnQYYZzwB7TdiVnzrFQ7qf586RiPhzTwKrGd71boqL6xZtOP5bf9ok50vhVanHVR j4kw== X-Received: by 10.70.41.6 with SMTP id b6mr20249996pdl.89.1437669561484; Thu, 23 Jul 2015 09:39:21 -0700 (PDT) Received: from vaishali-Ideapad-Z570 ([150.107.240.171]) by smtp.gmail.com with ESMTPSA id ml10sm9940847pab.47.2015.07.23.09.39.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jul 2015 09:39:20 -0700 (PDT) Date: Thu, 23 Jul 2015 22:09:15 +0530 From: Vaishali Thakkar To: Max Filippov Message-ID: <20150723163914.GA4050@vaishali-Ideapad-Z570> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: linux-xtensa@linux-xtensa.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Mark Brown Subject: [alsa-devel] [PATCH] ASoC: xtensa: Remove unnecessary snd_pcm_lib_preallocate_free_for_all() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The ALSA core takes care that all preallocated memory is freed when the PCM itself is freed. There is no need to do this manually in the driver. Signed-off-by: Vaishali Thakkar --- sound/soc/xtensa/xtfpga-i2s.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/xtensa/xtfpga-i2s.c b/sound/soc/xtensa/xtfpga-i2s.c index 1cfb19e..039f65e 100644 --- a/sound/soc/xtensa/xtfpga-i2s.c +++ b/sound/soc/xtensa/xtfpga-i2s.c @@ -474,11 +474,6 @@ static int xtfpga_pcm_new(struct snd_soc_pcm_runtime *rtd) card->dev, size, size); } -static void xtfpga_pcm_free(struct snd_pcm *pcm) -{ - snd_pcm_lib_preallocate_free_for_all(pcm); -} - static const struct snd_pcm_ops xtfpga_pcm_ops = { .open = xtfpga_pcm_open, .close = xtfpga_pcm_close, @@ -490,7 +485,6 @@ static const struct snd_pcm_ops xtfpga_pcm_ops = { static const struct snd_soc_platform_driver xtfpga_soc_platform = { .pcm_new = xtfpga_pcm_new, - .pcm_free = xtfpga_pcm_free, .ops = &xtfpga_pcm_ops, };