From patchwork Fri Nov 23 05:59:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 13119 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2244F24252 for ; Fri, 23 Nov 2012 06:05:50 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id C9E58A193BD for ; Fri, 23 Nov 2012 06:05:49 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1416885ieb.11 for ; Thu, 22 Nov 2012 22:05:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=GFOynormdKK2+/2C4S2VgLPdUpxdHhd/eZ3qe9FvjQc=; b=lrf8rIu7KV84od0mvgjXRsvgCH5mUTRgmj+iio+xne0lX8bbfyeteTbILu/cPqhEd/ RawGjkQKrXRpogdRH8fae9yYeL/+2fAzo3nMLkbCRLOTzEpGhllXe7lCYRVHsS11IXL2 vySsfc39idlTNEXMw1/rvPKpA3dS/dUyqbajSi9F9RnHinkTjl3ycfuttyxm3KRDq2xR pYx+raJbvUpyvK6Kxy5fC9Jm1hKOT1UNIuxd2GI6GIBG223iW/km3f3FPcwg09TB61de peiRN2xhi7aHnytHh+jY8MX+aY4RKV6xNRMl3RhcWY8hJYH+DhTNewnWHRUcnTfM+iEQ 44yQ== Received: by 10.43.7.132 with SMTP id oo4mr2364752icb.6.1353650749592; Thu, 22 Nov 2012 22:05:49 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp307431igt; Thu, 22 Nov 2012 22:05:49 -0800 (PST) Received: by 10.68.212.68 with SMTP id ni4mr11273807pbc.107.1353650748856; Thu, 22 Nov 2012 22:05:48 -0800 (PST) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by mx.google.com with ESMTPS id bf10si7069315pab.224.2012.11.22.22.05.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 22:05:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.52; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.52 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-pa0-f52.google.com with SMTP id fb1so2440173pad.25 for ; Thu, 22 Nov 2012 22:05:48 -0800 (PST) Received: by 10.66.85.67 with SMTP id f3mr7915169paz.0.1353650748623; Thu, 22 Nov 2012 22:05:48 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oi3sm3271920pbb.1.2012.11.22.22.05.45 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 22:05:47 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: w.sang@pengutronix.de, kgene.kim@samsung.com, patches@linaro.org Subject: [PATCH 4/7] i2c: s3c2410: Convert to use devm_ioremap() Date: Fri, 23 Nov 2012 11:29:10 +0530 Message-Id: <1353650353-17576-5-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353650353-17576-1-git-send-email-tushar.behera@linaro.org> References: <1353650353-17576-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQlLtNUVDiVTHGeSkgBEezB2wJuSKpSjix3XgjX2fFYNCwiSW+NqpNbTbzMlnf6Zdq0DdOTb Signed-off-by: Tushar Behera --- drivers/i2c/busses/i2c-s3c2410.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index a274ef7..3446af2 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -996,7 +996,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) goto err_clk; } - i2c->regs = ioremap(res->start, resource_size(res)); + i2c->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (i2c->regs == NULL) { dev_err(&pdev->dev, "cannot map IO\n"); @@ -1016,7 +1016,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ret = s3c24xx_i2c_init(i2c); if (ret != 0) - goto err_iomap; + goto err_clk; /* find the IRQ for this unit (note, this relies on the init call to * ensure no current IRQs pending @@ -1025,7 +1025,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) i2c->irq = ret = platform_get_irq(pdev, 0); if (ret <= 0) { dev_err(&pdev->dev, "cannot find IRQ\n"); - goto err_iomap; + goto err_clk; } ret = request_irq(i2c->irq, s3c24xx_i2c_irq, 0, @@ -1033,7 +1033,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) if (ret != 0) { dev_err(&pdev->dev, "cannot claim IRQ %d\n", i2c->irq); - goto err_iomap; + goto err_clk; } ret = s3c24xx_i2c_register_cpufreq(i2c); @@ -1073,9 +1073,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) err_irq: free_irq(i2c->irq, i2c); - err_iomap: - iounmap(i2c->regs); - err_clk: clk_disable_unprepare(i2c->clk); return ret; @@ -1100,8 +1097,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev) clk_disable_unprepare(i2c->clk); - iounmap(i2c->regs); - s3c24xx_i2c_dt_gpio_free(i2c); return 0;