From patchwork Sun Aug 30 03:09:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 7096501 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 847119F1B9 for ; Sun, 30 Aug 2015 03:10:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DE552083B for ; Sun, 30 Aug 2015 03:10:17 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AB6F4207F8 for ; Sun, 30 Aug 2015 03:10:13 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1D1E426070F; Sun, 30 Aug 2015 05:10:10 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6D7A2260709; Sun, 30 Aug 2015 05:10:04 +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 15BE026070A; Sun, 30 Aug 2015 05:10:01 +0200 (CEST) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by alsa0.perex.cz (Postfix) with ESMTP id 52BAD260703 for ; Sun, 30 Aug 2015 05:09:54 +0200 (CEST) Received: by pabzx8 with SMTP id zx8so101971563pab.1 for ; Sat, 29 Aug 2015 20:09:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=ee0EJYPT8py/CrC+pSpUAtpgOmEmGYZ6grik9Tpu7ms=; b=eWvrMHzHhE3txC/liH2dhMcEnvAiJZN0go1nHHM6Lzeh5IjD+a7N2M9IfmX10LFc20 iRWV/9d+9Sn5sR5jLo39dskhslLDgrRMEnsjii6F1ZtepI6ucUox9wOUYRFnJrMk/RNu +k6dNX2vNkHfVc6UBFEFrZ6M2ZIhHQgh1wtBro+kNnPVHctj0f6V+38AUs87FYPXBxQS tmQp6/QFGWI49DF1+bVyb+lpnVcs1dTExwwWDkY/llXpxyoz9xLLLo7DFArlneRnoaMR pCYDgCQLwTaGvvkuTf70FkOaabDgJs5e2Kr8qqZeuH0/YJUBiqcQYS8+fT1qCD/LXRrQ g2Lw== X-Gm-Message-State: ALoCoQlZVGVDxm2puE7evFiQy1QSnqWxrY3tO3ilXh52wMTHC72+3efQp9Ou9pn76q02kh0kSebM X-Received: by 10.69.11.196 with SMTP id ek4mr27363938pbd.148.1440904193056; Sat, 29 Aug 2015 20:09:53 -0700 (PDT) Received: from phoenix.local (36-239-228-232.dynamic-ip.hinet.net. [36.239.228.232]) by smtp.gmail.com with ESMTPSA id nv8sm9999411pdb.92.2015.08.29.20.09.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Aug 2015 20:09:51 -0700 (PDT) Message-ID: <1440904189.32046.3.camel@ingics.com> From: Axel Lin To: Mark Brown Date: Sun, 30 Aug 2015 11:09:49 +0800 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: Manuel Lauss , alsa-devel@alsa-project.org, Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource 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 Use devm_ioremap_resource() instead of open code. Signed-off-by: Axel Lin Acked-by: Manuel Lauss --- sound/soc/au1x/psc-i2s.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index e742ef6..38e853a 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -305,19 +305,9 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) return -ENOMEM; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!iores) - return -ENODEV; - - ret = -EBUSY; - if (!devm_request_mem_region(&pdev->dev, iores->start, - resource_size(iores), - pdev->name)) - return -EBUSY; - - wd->mmio = devm_ioremap(&pdev->dev, iores->start, - resource_size(iores)); - if (!wd->mmio) - return -EBUSY; + wd->mmio = devm_ioremap_resource(&pdev->dev, iores); + if (IS_ERR(wd->mmio)) + return PTR_ERR(wd->mmio); dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); if (!dmares)