From patchwork Tue Jun 21 20:40:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 70594 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2209882qgy; Tue, 21 Jun 2016 13:41:17 -0700 (PDT) X-Received: by 10.98.3.3 with SMTP id 3mr17831041pfd.8.1466541675862; Tue, 21 Jun 2016 13:41:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si3570263pfa.86.2016.06.21.13.41.15; Tue, 21 Jun 2016 13:41:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751911AbcFUUko (ORCPT + 30 others); Tue, 21 Jun 2016 16:40:44 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:38793 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbcFUUkl (ORCPT ); Tue, 21 Jun 2016 16:40:41 -0400 Received: by mail-it0-f42.google.com with SMTP id h190so24276687ith.1 for ; Tue, 21 Jun 2016 13:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=0FNe823FBcEyp4KpUREfTh4pXj/DShLFjfzpDd8w3t8=; b=JXRchLrpx2fUjYKu+tdloAMyy7MkX4AbMuLqF7Q/U2e9BpMB9k4MCHTBrUcZ1HcTkP RqFsLupH/x1jg6ORkd8zkljdltPWoDYJTzxAP2tbOAPu5uPrjSUitK8ZH/0A+dY/v3Pn RNn1V05J8hRNwnh+/AF15CQeMzssd+SCKWnTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0FNe823FBcEyp4KpUREfTh4pXj/DShLFjfzpDd8w3t8=; b=lqBv4LhE+yfhb3pGPmBp0mqGChstgCMIfCKezIchk4xMyXZzRfqAfkSeKLuklTeZTy /mWfHwnF7oaEC1WoDyu+dS5Rk8EdfyL9kW3skCLyVSGxbrOV8Po8cpNT9PKInOxsOMZl wlZHVJZgG6CeKZbT76mUHuPY/MwCnGe7cPkyWmd2zlgPv+QM4giOvXg9r012ub8G0LyO pHtB1uJ/Z9HhVdBNFp4JITzctBXFPVVsm3Tr2q4KdweFIATaF/Gl8xkRwmKi0x0ml3nm Y4Y8ciMZr6m11Q60nGRJyQfDWK8We+PWmswDJxhc2UYuqeZ9KlCPMfo/TcA8anSfXEXQ Riyw== X-Gm-Message-State: ALyK8tL+BEqqp77pQ8+KdjvRxPPrb0f8FKW0xDCMO11BBgnclgWdWDhaUUa8IQHGV3YNrhbB X-Received: by 10.36.80.12 with SMTP id m12mr9260069itb.2.1466541615232; Tue, 21 Jun 2016 13:40:15 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id p63sm2177648itg.9.2016.06.21.13.40.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jun 2016 13:40:14 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] coresight: delay initialisation when children are missing Date: Tue, 21 Jun 2016 14:40:13 -0600 Message-Id: <1466541613-25815-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Depending on when CoreSight device are discovered it is possible that some IP block may be referencing devices that have not been added to the bus yet. The end result is missing nodes in the CoreSight topology even when the devices are present and properly initialised. This patch solves the problem by asking the driver core to try initialising the device at a later time when the children of a CoreSight node are missing. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/of_coresight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c index b68da1888fd5..18f1c8c4776b 100644 --- a/drivers/hwtracing/coresight/of_coresight.c +++ b/drivers/hwtracing/coresight/of_coresight.c @@ -166,7 +166,7 @@ struct coresight_platform_data *of_get_coresight_platform_data( rdev = of_coresight_get_endpoint_device(rparent); if (!rdev) - continue; + return ERR_PTR(-EPROBE_DEFER); pdata->child_names[i] = dev_name(rdev); pdata->child_ports[i] = rendpoint.id;