From patchwork Fri Nov 23 05:59:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 13120 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 C09FA24252 for ; Fri, 23 Nov 2012 06:05:53 +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 76CEEA18970 for ; Fri, 23 Nov 2012 06:05:53 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1416885ieb.11 for ; Thu, 22 Nov 2012 22:05:53 -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=UzA+ZFwlZn/srs/WPO1dVsTsRkqMXpUDfDoMWhscafQ=; b=FzXToo7LiIZwsIIpDf005akTjVkBXE2je72jWJMCY2ZlZv9xsa5ZepSNFMtNLVCRVL sfh0AxrD8xgCnWJq0vhYKgamVRUIjYrxhI1sWnTKbq/j0HllDVh/mcHZLforyFwur6Co fT+PPNyqsOtIrXLsu931yuRdwZFbsqPctjd01vwGU+evEniCOyH84tYLM1OFvUwutxmF tvREgcVuXc+nyZPOrAVUqKjmX8F0B7tvhkrpqWkeidTlCxWk3kd0dEeV1ev9sF13P+Yj uL3OOQIE0bOymHsUUakOaHMWksP/+MtqX+lRvAYBjARe46JNmvKUpbSsC1n+al1y1zIO cP8g== Received: by 10.43.125.133 with SMTP id gs5mr2285059icc.54.1353650753235; Thu, 22 Nov 2012 22:05:53 -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 n20csp307438igt; Thu, 22 Nov 2012 22:05:52 -0800 (PST) Received: by 10.66.81.42 with SMTP id w10mr7606559pax.66.1353650752673; Thu, 22 Nov 2012 22:05:52 -0800 (PST) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx.google.com with ESMTPS id f9si7089448paz.174.2012.11.22.22.05.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 22:05:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.44 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.44 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-f44.google.com with SMTP id hz11so4276671pad.31 for ; Thu, 22 Nov 2012 22:05:52 -0800 (PST) Received: by 10.66.80.68 with SMTP id p4mr7753797pax.35.1353650752449; Thu, 22 Nov 2012 22:05:52 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oi3sm3271920pbb.1.2012.11.22.22.05.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 22:05:51 -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 5/7] i2c: s3c2410: Convert to use devm_request_irq() Date: Fri, 23 Nov 2012 11:29:11 +0530 Message-Id: <1353650353-17576-6-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: ALoCoQkLJlVA40o7hyu/M/4WVFSlQ5D0N8YseCoKvmSonigUJTP844oY/Pp1mKl8I50WWgFnTqw9 Signed-off-by: Tushar Behera --- drivers/i2c/busses/i2c-s3c2410.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 3446af2..3e4143c 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1028,8 +1028,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) goto err_clk; } - ret = request_irq(i2c->irq, s3c24xx_i2c_irq, 0, - dev_name(&pdev->dev), i2c); + ret = devm_request_irq(&pdev->dev, i2c->irq, s3c24xx_i2c_irq, 0, + dev_name(&pdev->dev), i2c); if (ret != 0) { dev_err(&pdev->dev, "cannot claim IRQ %d\n", i2c->irq); @@ -1039,7 +1039,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ret = s3c24xx_i2c_register_cpufreq(i2c); if (ret < 0) { dev_err(&pdev->dev, "failed to register cpufreq notifier\n"); - goto err_irq; + goto err_clk; } /* Note, previous versions of the driver used i2c_add_adapter() @@ -1070,9 +1070,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) err_cpufreq: s3c24xx_i2c_deregister_cpufreq(i2c); - err_irq: - free_irq(i2c->irq, i2c); - err_clk: clk_disable_unprepare(i2c->clk); return ret; @@ -1093,7 +1090,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev) s3c24xx_i2c_deregister_cpufreq(i2c); i2c_del_adapter(&i2c->adap); - free_irq(i2c->irq, i2c); clk_disable_unprepare(i2c->clk);