From patchwork Fri Dec 9 10:03:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 5555 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 158C723E01 for ; Fri, 9 Dec 2011 10:06:34 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id F360CA18062 for ; Fri, 9 Dec 2011 10:06:33 +0000 (UTC) Received: by bke17 with SMTP id 17so3706250bke.11 for ; Fri, 09 Dec 2011 02:06:33 -0800 (PST) Received: by 10.204.152.138 with SMTP id g10mr1314408bkw.36.1323425193663; Fri, 09 Dec 2011 02:06:33 -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.205.129.2 with SMTP id hg2cs110682bkc; Fri, 9 Dec 2011 02:06:33 -0800 (PST) Received: by 10.50.87.227 with SMTP id bb3mr2982221igb.29.1323425190791; Fri, 09 Dec 2011 02:06:30 -0800 (PST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id ul9si3565333icb.82.2011.12.09.02.06.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Dec 2011 02:06:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by iagk10 with SMTP id k10so2945007iag.37 for ; Fri, 09 Dec 2011 02:06:30 -0800 (PST) Received: by 10.50.40.135 with SMTP id x7mr2892249igk.48.1323425189903; Fri, 09 Dec 2011 02:06:29 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id 36sm8343230ibc.6.2011.12.09.02.06.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Dec 2011 02:06:28 -0800 (PST) From: Tushar Behera To: linux-i2c@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: ben-linux@fluff.org, kgene.kim@samsung.com, linaro-dev@lists.linaro.org, patches@linaro.org, thomas.abraham@linaro.org Subject: [PATCH] i2c-s3c2410: Fix return code of s3c24xx_i2c_parse_dt_gpio Date: Fri, 9 Dec 2011 15:33:55 +0530 Message-Id: <1323425035-11298-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 s3c24xx_i2c_parse_dt_gpio is called when cfg_gpio is not defined in the platform data of the i2c device. When DT is not enabled, the above function always returns -EINVAL. Since there can be some i2c devices which don't need to configure any gpio lines, the probe of such devices would fail here. Changing the default return value to success would fix this issue. Signed-off-by: Tushar Behera --- This patch is rebased on Kukjin's for-next branch. d3d936c "Merge branch 'samsung-fixes-2' into for-next" drivers/i2c/busses/i2c-s3c2410.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 2754cef..b5caa42 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -786,7 +786,7 @@ static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c) #else static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c) { - return -EINVAL; + return 0; } static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)