From patchwork Mon Dec 31 11:09:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1921101 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 35B8EE00D0 for ; Mon, 31 Dec 2012 11:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751647Ab2LaLJq (ORCPT ); Mon, 31 Dec 2012 06:09:46 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:55516 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424Ab2LaLJk (ORCPT ); Mon, 31 Dec 2012 06:09:40 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id qBVB9dUM009614; Mon, 31 Dec 2012 05:09:39 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBVB9dfl006722; Mon, 31 Dec 2012 05:09:39 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Mon, 31 Dec 2012 05:09:39 -0600 Received: from barack.emea.dhcp.ti.com (barack.emea.dhcp.ti.com [137.167.125.64]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBVB9W3X030265; Mon, 31 Dec 2012 05:09:38 -0600 From: Peter Ujfalusi To: Samuel Ortiz CC: , , Tero Kristo Subject: [PATCH 05/10] mfd: twl-core: Do not try to call legacy mfd add_children() when booted with DT Date: Mon, 31 Dec 2012 12:09:26 +0100 Message-ID: <1356952171-6109-6-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.8.0.2 In-Reply-To: <1356952171-6109-1-git-send-email-peter.ujfalusi@ti.com> References: <1356952171-6109-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org There is really no point to retry to add children devices in case the of_platform_populate() fails. We do not have any information provided via pdata in this case anyways. Depending on the boot type (legacy or DT) only execute either one. Signed-off-by: Peter Ujfalusi --- drivers/mfd/twl-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index fbff830..86cca9e 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -1305,10 +1305,9 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id) twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1); } - status = -ENODEV; if (node) status = of_platform_populate(node, NULL, NULL, &client->dev); - if (status) + else status = add_children(pdata, irq_base, id->driver_data); fail: