Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3114296ybl; Mon, 19 Aug 2019 12:26:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyHKIynU3iDaw6qIqVqIYLCZQCRo+P4NvJ8sgCHRH1gJE3W+hsKBqiGsx3o7uG0N5XHmIb X-Received: by 2002:a63:f04:: with SMTP id e4mr20806744pgl.38.1566242813102; Mon, 19 Aug 2019 12:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566242813; cv=none; d=google.com; s=arc-20160816; b=uNg8N8/l0NAk57Ec+JEeB99nkstylX3OJTK8BmlcTWgj8ChC7AySONEv3rgcyfCKuj ESM6akWMgJo/JkpEkcJ/oD996cLFoAgBP8/O6tNUG4EqLlvFRme1o/ZCTHPPCUEU2KyX EDoeJQnbJch1PzXFzGw/I2q2oVn1C0fBoBXZCz2Bq+4G/gjM/oY463Hicq23JJXbh8vu i5K9Mk1Vbs6rwTx8LVfEetw0dI1ybhmfcC+z9xC+QZxzC+kKVynGvRoxDw13Mhtv7cGZ czdXKpo18B7BVu0L5XloSZ/Jjhrc9E9qH9uksNcA/xPIlBi7PSh7znK0zl2mHgpR2lcj Oklw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TSTaRu5qQq+Ym/JhVr6QlgToIgTfHwuaPcoINY9KmFQ=; b=PZhgW8OSrvaIsmWr8R6b5NBje2ZmsltaWP3NUrJLr4vsQh6gehGKL7DX0rx21girNm 6d8nuyrFM5eJIf6t1hnacSPQMPlXKbAgZmsLXEnndLWZvXbhgVuxq85ETo2A5CC7IGpJ YNeSzy738wD+2eJdPJnYoUyXQqXW0HrHS9Ym5uq8bMWRt24vOluFoCxCirhSDBB3q0YY D55nS0d6ddzRhBqW5aPCBmAsIG2zJ5urhRYgyJs03QenFZQpc76m1D5q0iWIQVqYNKEI kCYf9pRgq4Vrxck/qbGdHGrq68bd6npGkFdX+wk+BqcQ77YQMfMxZxPzKiug4qnCR7Wy cNBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rl8cyP+E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t134si10397290pgc.361.2019.08.19.12.26.38; Mon, 19 Aug 2019 12:26:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rl8cyP+E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728509AbfHSTZk (ORCPT + 99 others); Mon, 19 Aug 2019 15:25:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728337AbfHSTZj (ORCPT ); Mon, 19 Aug 2019 15:25:39 -0400 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 19D0C22CF4; Mon, 19 Aug 2019 19:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566242738; bh=KWvMAVh8158Vfot7bGOe/TZP6z7v55KtdLwvGs8+fyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rl8cyP+EOopS1H4rho1U/AiNRXHlyHm53mEiFLDzajk2B8TlmRoa1ogWcWL/12kro YOby6qvoM/VYXrXOe8an/y9R59mtvrUvlM5y9AfycmsJahHL7kWkYNeZnGmyt/6UW/ RsWACt/0oxJL+R6W7/DSKGwDFhJKItIy4lgpLFdY= From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , lgirdwood@gmail.com, broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, codekipper@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH 02/21] ASoC: sun4i-i2s: Switch to devm for PCM register Date: Mon, 19 Aug 2019 21:25:09 +0200 Message-Id: <606d271187091e858e8c15e20555af0b79798fe1.1566242458.git-series.maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Ripard Since the introduction of the driver, a new managed helper for the dmaengine PCM registration has been created. Let's use it to simplify a bit our probe and remove functions. Signed-off-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 85c3b2c8cd77..1ed7670eae9c 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1154,7 +1154,7 @@ static int sun4i_i2s_probe(struct platform_device *pdev) goto err_suspend; } - ret = snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); if (ret) { dev_err(&pdev->dev, "Could not register PCM\n"); goto err_suspend; @@ -1185,8 +1185,6 @@ static int sun4i_i2s_remove(struct platform_device *pdev) { struct sun4i_i2s *i2s = dev_get_drvdata(&pdev->dev); - snd_dmaengine_pcm_unregister(&pdev->dev); - pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) sun4i_i2s_runtime_suspend(&pdev->dev); -- git-series 0.9.1