From patchwork Fri Jul 4 20:24:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 4483471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 08A569F433 for ; Fri, 4 Jul 2014 20:27:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 173CE20265 for ; Fri, 4 Jul 2014 20:27:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CDF832038C for ; Fri, 4 Jul 2014 20:27:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X3A3K-0005pS-1L; Fri, 04 Jul 2014 20:25:50 +0000 Received: from bhuna.collabora.co.uk ([93.93.135.160]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X3A2z-0005TG-PO for linux-arm-kernel@lists.infradead.org; Fri, 04 Jul 2014 20:25:30 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id 2E11A60276D From: Javier Martinez Canillas To: Lee Jones Subject: [PATCH v7 04/24] mfd: max77686: Make platform data over-rule DT Date: Fri, 4 Jul 2014 22:24:07 +0200 Message-Id: <1404505467-26526-5-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1404505467-26526-1-git-send-email-javier.martinez@collabora.co.uk> References: <1404505467-26526-1-git-send-email-javier.martinez@collabora.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140704_132529_990487_9ED50C9B X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Alessandro Zummo , Krzysztof Kozlowski , Kukjin Kim , Mike Turquette , Tomeu Vizoso , devicetree@vger.kernel.org, Yadwinder Singh Brar , linux-kernel@vger.kernel.org, Liam Girdwood , Javier Martinez Canillas , Doug Anderson , Tushar Behera , Mark Brown , linux-samsung-soc@vger.kernel.org, Olof Johansson , Andreas Farber , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function max77802_i2c_parse_dt_pdata() should only be called if there isn't already platform data for the device. Signed-off-by: Javier Martinez Canillas Acked-by: Lee Jones --- drivers/mfd/max77686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c index d1f9d04..12d4c17 100644 --- a/drivers/mfd/max77686.c +++ b/drivers/mfd/max77686.c @@ -124,7 +124,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c, unsigned int data; int ret = 0; - if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) + if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node && !pdata) pdata = max77686_i2c_parse_dt_pdata(&i2c->dev); if (!pdata) {