Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp38226rdb; Thu, 31 Aug 2023 02:11:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFW+Ch9ZppQcf6RcIxngQ9RkbE9trDpc2Egs2g6exqW00VVxWY7hJqMUrYfNarB5JIWOv8c X-Received: by 2002:aa7:dd0b:0:b0:525:6cc7:8092 with SMTP id i11-20020aa7dd0b000000b005256cc78092mr3931803edv.13.1693473116260; Thu, 31 Aug 2023 02:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693473116; cv=none; d=google.com; s=arc-20160816; b=aReoNPF26vy3W4txs6zj/Lef7vOOXI+TMeCli/EQQNjgRUL6H/dCAsDacM3hFcCb5W dF7obl8isVx6sE28/Bp2HvYC3nm8GQHukxiodYZUGG0H3katX1LLdIIy6JmUUdjiTiEu oRxZ5i5n78dBTPikV6HYOmjb/Py5dMPC7WI2xLaorzUlfyHRBIT4bLBw4RpZEr7SJe4S zMxYpxmvgLZ++SzdWXHgnVAHISUH6Ry4jpWlGXvYvB4dtwR5lBSYxV74K/IcKeu+JZuU sLTNzL49KupI+D0koTaASqKWUJ5TmJIoDWyglf5cKigSd4c8jYkjSWF9MK5TevuFkO0Y DnHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qGOSPmjG1ZZMiUjimzrjai7WQOPNH2MlvNsTG0lP/yw=; fh=YwJMbeg+3jadkqx++b8GHN/wxtSTxMsJ/Z9NPf7adNs=; b=lrb6ezN+1PzgnXnazZR2aUK653HQRdTT2SUzBzr5hZ7/fjkv2mx2X/6R9YuLrVAvEN S2GVWjIOCu5BU+JKKrCoHygctUjv1QPyfKMYa9nbF6JIcLDrqFio8oge0KsPV5qMYW0L eqOHxsZd47jNRBmysERDDxEcHJWUA6hQn56+beyFh/vTGT1D9WmtIIApPnpxDf+hl9qq tlhIhJ55qROa81ZfzxH4FOJ0OCqYZd4oRQasKQIstP6iKsRfgLHMJFNACcTcluoiU334 X9YO2yAGhwEr7mOZJQPvfRTQVvIRoo926sMGl1ccIW7JAzVrXZ5hDeZHQmtcFoTDvUe8 1UOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n14-20020aa7db4e000000b0052bdafff6f5si735684edt.646.2023.08.31.02.11.30; Thu, 31 Aug 2023 02:11:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243800AbjHaIKH (ORCPT + 99 others); Thu, 31 Aug 2023 04:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242791AbjHaIKF (ORCPT ); Thu, 31 Aug 2023 04:10:05 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5AFFFCE7 for ; Thu, 31 Aug 2023 01:09:58 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.02,216,1688396400"; d="scan'208";a="178287328" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 31 Aug 2023 17:09:58 +0900 Received: from localhost.localdomain (unknown [10.226.92.179]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 780704010DFE; Thu, 31 Aug 2023 17:09:52 +0900 (JST) From: Biju Das To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Andrzej Hajda , Neil Armstrong , Robert Foss , David Airlie , Daniel Vetter Cc: Biju Das , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Douglas Anderson , Laurent Pinchart Subject: [PATCH v6 2/4] drm/bridge: Drop conditionals around of_node pointers Date: Thu, 31 Aug 2023 09:09:36 +0100 Message-Id: <20230831080938.47454-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230831080938.47454-1-biju.das.jz@bp.renesas.com> References: <20230831080938.47454-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is based on commit c9e358dfc4a8 ("driver-core: remove conditionals around devicetree pointers"). Having conditional around the of_node pointer of the drm_bridge structure turns out to make driver code use ugly #ifdef blocks. Drop the conditionals to simplify drivers. While this slightly increases the size of struct drm_bridge on non-OF system, the number of bridges used today and foreseen tomorrow on those systems is very low, so this shouldn't be an issue. So drop #if conditionals by adding struct device_node forward declaration. Suggested-by: Douglas Anderson Signed-off-by: Biju Das Reviewed-by: Douglas Anderson Reviewed-by: Laurent Pinchart --- v5->v6: * Updated commit description. * Added Rb tag from Douglas Anderson and Laurent v5: * Split from patch#2 * Updated commit description * Added struct device_node forward declaration. --- include/drm/drm_bridge.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index c339fc85fd07..843736627f60 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -32,6 +32,8 @@ #include #include +struct device_node; + struct drm_bridge; struct drm_bridge_timings; struct drm_connector; @@ -716,10 +718,8 @@ struct drm_bridge { struct drm_encoder *encoder; /** @chain_node: used to form a bridge chain */ struct list_head chain_node; -#ifdef CONFIG_OF /** @of_node: device node pointer to the bridge */ struct device_node *of_node; -#endif /** @list: to keep track of all added bridges */ struct list_head list; /** -- 2.25.1