From patchwork Wed Dec 18 13:56:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Pargmann X-Patchwork-Id: 3370311 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DA0C3C0D4A for ; Wed, 18 Dec 2013 13:56:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2408201BB for ; Wed, 18 Dec 2013 13:56:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6F3A2014A for ; Wed, 18 Dec 2013 13:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754440Ab3LRN4O (ORCPT ); Wed, 18 Dec 2013 08:56:14 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:49826 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753842Ab3LRN4N (ORCPT ); Wed, 18 Dec 2013 08:56:13 -0500 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1VtHbc-0005TR-5T; Wed, 18 Dec 2013 14:56:08 +0100 Received: from mpa by dude.hi.pengutronix.de with local (Exim 4.82) (envelope-from ) id 1VtHba-0006bU-Hg; Wed, 18 Dec 2013 14:56:06 +0100 From: Markus Pargmann To: David Airlie Cc: dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, kernel@pengutronix.de, Markus Pargmann Subject: [PATCH] drm/tilcdc: Defer probe if no encoders/connectors found Date: Wed, 18 Dec 2013 14:56:01 +0100 Message-Id: <1387374961-11741-1-git-send-email-mpa@pengutronix.de> X-Mailer: git-send-email 1.8.5.1 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 At the moment this driver fails to load if no encoders/connectors were found. In case other drivers that register encoders/connectors (tilcdc_panel) are defered it would be better to check for encoders/connectors later again. This patch replaces the returncode -ENXIO with -EPROBE_DEFER to get a working setup even if tilcdc_panel probes after tilcdc. Signed-off-by: Markus Pargmann Signed-off-by: Rob Clark --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 116da19..217303c 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -84,7 +84,7 @@ static int modeset_init(struct drm_device *dev) if ((priv->num_encoders == 0) || (priv->num_connectors == 0)) { /* oh nos! */ dev_err(dev->dev, "no encoders/connectors found\n"); - return -ENXIO; + return -EPROBE_DEFER; } dev->mode_config.min_width = 0;