From patchwork Wed Feb 13 07:22:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastien Guiriec X-Patchwork-Id: 2134511 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 27D8A3FCF6 for ; Wed, 13 Feb 2013 07:22:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753991Ab3BMHWY (ORCPT ); Wed, 13 Feb 2013 02:22:24 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:54088 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752328Ab3BMHWY (ORCPT ); Wed, 13 Feb 2013 02:22:24 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r1D7MBJg009793; Wed, 13 Feb 2013 01:22:11 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r1D7MBoB020074; Wed, 13 Feb 2013 01:22:11 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Wed, 13 Feb 2013 01:22:10 -0600 Received: from unb0919150.emea.dhcp.ti.com (unb0919150.emea.dhcp.ti.com [137.167.110.144]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r1D7M9V5020736; Wed, 13 Feb 2013 01:22:09 -0600 From: Sebastien Guiriec To: Sebastien Guiriec , Peter Ujfalusi , Jarkko Nikula , Liam Girdwood , Mark Brown , , Subject: [PATCH] ASoC: omap-dmic: Clean up with devm_request_and_ioremap Date: Wed, 13 Feb 2013 08:22:07 +0100 Message-ID: <1360740127-4154-1-git-send-email-s-guiriec@ti.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Clean up dmic code with devm_request_and_ioremap function. Signed-off-by: Sebastien Guiriec Acked-by: Peter Ujfalusi --- sound/soc/omap/omap-dmic.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index ba49ccd..77e9e7e 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c @@ -493,16 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev) goto err_put_clk; } - if (!devm_request_mem_region(&pdev->dev, res->start, - resource_size(res), pdev->name)) { - dev_err(dmic->dev, "memory region already claimed\n"); - ret = -ENODEV; - goto err_put_clk; - } - - dmic->io_base = devm_ioremap(&pdev->dev, res->start, - resource_size(res)); + dmic->io_base = devm_request_and_ioremap(&pdev->dev, res); if (!dmic->io_base) { + dev_err(&pdev->dev, "cannot remap\n"); ret = -ENOMEM; goto err_put_clk; }