Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755500AbbHFOVt (ORCPT ); Thu, 6 Aug 2015 10:21:49 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:33081 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754858AbbHFOTP (ORCPT ); Thu, 6 Aug 2015 10:19:15 -0400 From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: Rob Herring , Stephen Warren , Javier Martinez Canillas , Mark Brown , Thierry Reding , "Rafael J. Wysocki" , linux-arm-kernel@lists.infradead.org, Dmitry Torokhov , devicetree@vger.kernel.org, Linus Walleij , linux-acpi@vger.kernel.org, Arnd Bergmann , Tomeu Vizoso Subject: [PATCH v3 17/18] power-supply: Probe power supplies on demand Date: Thu, 6 Aug 2015 16:11:54 +0200 Message-Id: <1438870315-18689-18-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1438870315-18689-1-git-send-email-tomeu.vizoso@collabora.com> References: <1438870315-18689-1-git-send-email-tomeu.vizoso@collabora.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1424 Lines: 45 When looking up a power supply through its OF node, probe it if it hasn't already. The goal is to reduce deferred probes to a minimum, as it makes it very cumbersome to find out why a device failed to probe, and can introduce very big delays in when a critical device is probed. Signed-off-by: Tomeu Vizoso --- Changes in v3: None Changes in v2: None drivers/power/power_supply_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c index 456987c88baa..668d71656592 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_core.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "power_supply.h" /* exported for the APM Power driver, APM emulation */ @@ -206,6 +207,8 @@ static int power_supply_find_supply_from_node(struct device_node *supply_node) { int error; + of_platform_probe(supply_node); + /* * class_for_each_device() either returns its own errors or values * returned by __power_supply_find_supply_from_node(). -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/