From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 646A0C43217 for ; Thu, 6 Jan 2022 21:47:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6529310EFEF; Thu, 6 Jan 2022 21:46:43 +0000 (UTC) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 54DAA10EFFE for ; Thu, 6 Jan 2022 21:46:40 +0000 (UTC) Received: by mail-pf1-x42f.google.com with SMTP id t123so3556701pfc.13 for ; Thu, 06 Jan 2022 13:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HmFwe71O6SgnJZrxVfyGwLakllS28Q6zlhd/maqZWnU=; b=oC+aBC1DvSyWs1byL8S+AMM9Zu/djXQvhnAeWjvOvlnZeTMYSqnmbERAdSpvGGNYLm tdgv+mY67LYuE2BD+8rhc7e7pjkRv4BqIyA7q84WzE8urLjsvcaMcjg4RasM6lZJLPsO wO14hLbGdiFL9b3CKehnp/G/BuUYpTXTgtc8E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HmFwe71O6SgnJZrxVfyGwLakllS28Q6zlhd/maqZWnU=; b=4znN3NK5u3NRfxXCQ+b4/9/yTpfLUqpTEEt6TZmC9Ejf6zyLULswLQTI+yIQEoIq5V AfQeKaJ4j141+QwbWCN1Xbru11u6s79w4XXLQlNY9kMNj6YcTREfCs6sS6vojZXvIFEm cFfTltymwJyzGCfDrbtqbzbkO+5Xz/AWcCMTg0L+ccCIIdHFnZyNJW6unrDAClHc0+W3 FMCvM2ANvbqyQwcGIuoTgeOmrf5dqN0vu70fYu8cbpn8RjST5YcJjij+oQC6VA0QHIF/ h3cui0ZmPLKq4NnjZHt1CMoVfn2VWrQWcrpcTpgCKrfFrvZXRMo1nSBFLC+FTMVY7p+E ndKA== X-Gm-Message-State: AOAM533uUJFLB9OKVCcZqCJCvnkBYQABQKwG5alqg4MGxYxs63PJirQd evFkTMq5uO1eu6hoxqplIF1CWg== X-Google-Smtp-Source: ABdhPJyHHiB/EXo8B0gxoZ3UvSHLGFDgF66NPCj3nIz0wmI71ULItFhSv5xHAWdhhG2PoRUUvjitlw== X-Received: by 2002:a63:350c:: with SMTP id c12mr45735439pga.568.1641505599934; Thu, 06 Jan 2022 13:46:39 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:1ebe:a8fd:f9b0:7e85]) by smtp.gmail.com with ESMTPSA id 10sm3539960pfm.56.2022.01.06.13.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 13:46:39 -0800 (PST) From: Stephen Boyd To: Greg Kroah-Hartman , Douglas Anderson Subject: [PATCH v5 31/32] component: Get rid of drm_of_component_probe() Date: Thu, 6 Jan 2022 13:45:54 -0800 Message-Id: <20220106214556.2461363-32-swboyd@chromium.org> X-Mailer: git-send-email 2.34.1.448.ga2b2bfdf31-goog In-Reply-To: <20220106214556.2461363-1-swboyd@chromium.org> References: <20220106214556.2461363-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Saravana Kannan , "Rafael J. Wysocki" , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Laurent Pinchart , linux-arm-msm@vger.kernel.org, Russell King , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There aren't any users anymore so drop it. Cc: Laurent Pinchart Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Signed-off-by: Stephen Boyd --- drivers/gpu/drm/drm_of.c | 85 +++++++++------------------------------- include/drm/drm_of.h | 12 ------ 2 files changed, 19 insertions(+), 78 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 008d6b7d2283..c57216e28b70 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -99,18 +99,30 @@ void drm_of_component_match_add(struct device *master, } EXPORT_SYMBOL_GPL(drm_of_component_match_add); -static int _drm_of_component_probe(struct device *dev, +/** + * drm_of_aggregate_probe - Generic probe function for a component based aggregate host + * @dev: device containing the OF node + * @compare_of: compare function used for matching components + * @adrv: aggregate driver to be used + * + * Parse the platform device OF node and bind all the components associated + * with the aggregate device. Interface ports are added before the encoders in + * order to satisfy their .bind_component requirements + * See Documentation/devicetree/bindings/graph.txt for the bindings. + * + * Returns zero if successful, or one of the standard error codes if it fails. + */ +int drm_of_aggregate_probe(struct device *dev, int (*compare_of)(struct device *, void *), - struct component_match **matchptr) + struct aggregate_driver *adrv) { struct device_node *ep, *port, *remote; + struct component_match *match = NULL; int i; if (!dev->of_node) return -EINVAL; - *matchptr = NULL; - /* * Bind the crtc's ports first, so that drm_of_find_possible_crtcs() * called from encoder's .bind callbacks works as expected @@ -121,7 +133,7 @@ static int _drm_of_component_probe(struct device *dev, break; if (of_device_is_available(port->parent)) - drm_of_component_match_add(dev, matchptr, compare_of, + drm_of_component_match_add(dev, &match, compare_of, port); of_node_put(port); @@ -132,7 +144,7 @@ static int _drm_of_component_probe(struct device *dev, return -ENODEV; } - if (!*matchptr) { + if (!match) { dev_err(dev, "no available port\n"); return -ENODEV; } @@ -162,72 +174,13 @@ static int _drm_of_component_probe(struct device *dev, continue; } - drm_of_component_match_add(dev, matchptr, compare_of, + drm_of_component_match_add(dev, &match, compare_of, remote); of_node_put(remote); } of_node_put(port); } - return 0; -} - -/** - * drm_of_component_probe - Generic probe function for a component based master - * @dev: master device containing the OF node - * @compare_of: compare function used for matching components - * @m_ops: component master ops to be used - * - * Parse the platform device OF node and bind all the components associated - * with the master. Interface ports are added before the encoders in order to - * satisfy their .bind requirements - * See Documentation/devicetree/bindings/graph.txt for the bindings. - * - * Deprecated: Use drm_of_aggregate_probe() instead. - * - * Returns zero if successful, or one of the standard error codes if it fails. - */ -int drm_of_component_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - const struct component_master_ops *m_ops) -{ - - struct component_match *match; - int ret; - - ret = _drm_of_component_probe(dev, compare_of, &match); - if (ret) - return ret; - - return component_master_add_with_match(dev, m_ops, match); -} -EXPORT_SYMBOL(drm_of_component_probe); - - -/** - * drm_of_aggregate_probe - Generic probe function for a component based aggregate host - * @dev: device containing the OF node - * @compare_of: compare function used for matching components - * @adrv: aggregate driver to be used - * - * Parse the platform device OF node and bind all the components associated - * with the aggregate device. Interface ports are added before the encoders in - * order to satisfy their .bind_component requirements - * See Documentation/devicetree/bindings/graph.txt for the bindings. - * - * Returns zero if successful, or one of the standard error codes if it fails. - */ -int drm_of_aggregate_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - struct aggregate_driver *adrv) -{ - struct component_match *match; - int ret; - - ret = _drm_of_component_probe(dev, compare_of, &match); - if (ret) - return ret; - return component_aggregate_register(dev, adrv, match); } EXPORT_SYMBOL(drm_of_aggregate_probe); diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 9d35a141f888..33fba4f8e304 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -8,7 +8,6 @@ #endif struct aggregate_driver; -struct component_master_ops; struct component_match; struct device; struct drm_device; @@ -38,9 +37,6 @@ void drm_of_component_match_add(struct device *master, struct component_match **matchptr, int (*compare)(struct device *, void *), struct device_node *node); -int drm_of_component_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - const struct component_master_ops *m_ops); int drm_of_aggregate_probe(struct device *dev, int (*compare_of)(struct device *, void *), struct aggregate_driver *adrv); @@ -74,14 +70,6 @@ drm_of_component_match_add(struct device *master, { } -static inline int -drm_of_component_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - const struct component_master_ops *m_ops) -{ - return -EINVAL; -} - static inline int drm_of_aggregate_probe(struct device *dev, int (*compare_of)(struct device *, void *), -- https://chromeos.dev From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8822BC433EF for ; Thu, 6 Jan 2022 21:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244994AbiAFVrt (ORCPT ); Thu, 6 Jan 2022 16:47:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245052AbiAFVrG (ORCPT ); Thu, 6 Jan 2022 16:47:06 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55667C028C37 for ; Thu, 6 Jan 2022 13:46:40 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id g2so3723539pgo.9 for ; Thu, 06 Jan 2022 13:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HmFwe71O6SgnJZrxVfyGwLakllS28Q6zlhd/maqZWnU=; b=oC+aBC1DvSyWs1byL8S+AMM9Zu/djXQvhnAeWjvOvlnZeTMYSqnmbERAdSpvGGNYLm tdgv+mY67LYuE2BD+8rhc7e7pjkRv4BqIyA7q84WzE8urLjsvcaMcjg4RasM6lZJLPsO wO14hLbGdiFL9b3CKehnp/G/BuUYpTXTgtc8E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HmFwe71O6SgnJZrxVfyGwLakllS28Q6zlhd/maqZWnU=; b=4vfMF1dViUf11xix6mp3t0LBNzuWI57bJQQ2M6W3a7iSXjFUMUziDHGPiNAWUzMxLi IDo1Pc4EKI/hizPSeUUyRXedFztIqZPMy3G2+N+jGxNAGkPd1lmoz8/+9MH4upHaTLia u9fwW7Se8Y3O3znVgkK4L6htiI7eiMUMMLEWhNYJUqgPtekzZpXlM5rLsDzIDvyqAhPR +MDTCl7gi3qz0Q21TvkJMZl9B95OhSebMdwUbCUrTei1ZWmI63+3MnWf21S78gXHsYUw ilvPJWmGr23zc7GxgAN6+ktM1TnBhoqd9coquwz4ENzwSj+FtuuihFuX3obczPjVaGYJ hPEA== X-Gm-Message-State: AOAM531W+uZrjZlslFJYRyZyDnu/vpzVDmQ2hL5bvJNZRmB5Fcpz1BWO ntP0tvIZa+DYSj1WZG1wO2wQZ6M6EFEstQ== X-Google-Smtp-Source: ABdhPJyHHiB/EXo8B0gxoZ3UvSHLGFDgF66NPCj3nIz0wmI71ULItFhSv5xHAWdhhG2PoRUUvjitlw== X-Received: by 2002:a63:350c:: with SMTP id c12mr45735439pga.568.1641505599934; Thu, 06 Jan 2022 13:46:39 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:1ebe:a8fd:f9b0:7e85]) by smtp.gmail.com with ESMTPSA id 10sm3539960pfm.56.2022.01.06.13.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 13:46:39 -0800 (PST) From: Stephen Boyd To: Greg Kroah-Hartman , Douglas Anderson Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Laurent Pinchart , Daniel Vetter , "Rafael J. Wysocki" , Rob Clark , Russell King , Saravana Kannan Subject: [PATCH v5 31/32] component: Get rid of drm_of_component_probe() Date: Thu, 6 Jan 2022 13:45:54 -0800 Message-Id: <20220106214556.2461363-32-swboyd@chromium.org> X-Mailer: git-send-email 2.34.1.448.ga2b2bfdf31-goog In-Reply-To: <20220106214556.2461363-1-swboyd@chromium.org> References: <20220106214556.2461363-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org There aren't any users anymore so drop it. Cc: Laurent Pinchart Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Signed-off-by: Stephen Boyd --- drivers/gpu/drm/drm_of.c | 85 +++++++++------------------------------- include/drm/drm_of.h | 12 ------ 2 files changed, 19 insertions(+), 78 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 008d6b7d2283..c57216e28b70 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -99,18 +99,30 @@ void drm_of_component_match_add(struct device *master, } EXPORT_SYMBOL_GPL(drm_of_component_match_add); -static int _drm_of_component_probe(struct device *dev, +/** + * drm_of_aggregate_probe - Generic probe function for a component based aggregate host + * @dev: device containing the OF node + * @compare_of: compare function used for matching components + * @adrv: aggregate driver to be used + * + * Parse the platform device OF node and bind all the components associated + * with the aggregate device. Interface ports are added before the encoders in + * order to satisfy their .bind_component requirements + * See Documentation/devicetree/bindings/graph.txt for the bindings. + * + * Returns zero if successful, or one of the standard error codes if it fails. + */ +int drm_of_aggregate_probe(struct device *dev, int (*compare_of)(struct device *, void *), - struct component_match **matchptr) + struct aggregate_driver *adrv) { struct device_node *ep, *port, *remote; + struct component_match *match = NULL; int i; if (!dev->of_node) return -EINVAL; - *matchptr = NULL; - /* * Bind the crtc's ports first, so that drm_of_find_possible_crtcs() * called from encoder's .bind callbacks works as expected @@ -121,7 +133,7 @@ static int _drm_of_component_probe(struct device *dev, break; if (of_device_is_available(port->parent)) - drm_of_component_match_add(dev, matchptr, compare_of, + drm_of_component_match_add(dev, &match, compare_of, port); of_node_put(port); @@ -132,7 +144,7 @@ static int _drm_of_component_probe(struct device *dev, return -ENODEV; } - if (!*matchptr) { + if (!match) { dev_err(dev, "no available port\n"); return -ENODEV; } @@ -162,72 +174,13 @@ static int _drm_of_component_probe(struct device *dev, continue; } - drm_of_component_match_add(dev, matchptr, compare_of, + drm_of_component_match_add(dev, &match, compare_of, remote); of_node_put(remote); } of_node_put(port); } - return 0; -} - -/** - * drm_of_component_probe - Generic probe function for a component based master - * @dev: master device containing the OF node - * @compare_of: compare function used for matching components - * @m_ops: component master ops to be used - * - * Parse the platform device OF node and bind all the components associated - * with the master. Interface ports are added before the encoders in order to - * satisfy their .bind requirements - * See Documentation/devicetree/bindings/graph.txt for the bindings. - * - * Deprecated: Use drm_of_aggregate_probe() instead. - * - * Returns zero if successful, or one of the standard error codes if it fails. - */ -int drm_of_component_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - const struct component_master_ops *m_ops) -{ - - struct component_match *match; - int ret; - - ret = _drm_of_component_probe(dev, compare_of, &match); - if (ret) - return ret; - - return component_master_add_with_match(dev, m_ops, match); -} -EXPORT_SYMBOL(drm_of_component_probe); - - -/** - * drm_of_aggregate_probe - Generic probe function for a component based aggregate host - * @dev: device containing the OF node - * @compare_of: compare function used for matching components - * @adrv: aggregate driver to be used - * - * Parse the platform device OF node and bind all the components associated - * with the aggregate device. Interface ports are added before the encoders in - * order to satisfy their .bind_component requirements - * See Documentation/devicetree/bindings/graph.txt for the bindings. - * - * Returns zero if successful, or one of the standard error codes if it fails. - */ -int drm_of_aggregate_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - struct aggregate_driver *adrv) -{ - struct component_match *match; - int ret; - - ret = _drm_of_component_probe(dev, compare_of, &match); - if (ret) - return ret; - return component_aggregate_register(dev, adrv, match); } EXPORT_SYMBOL(drm_of_aggregate_probe); diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 9d35a141f888..33fba4f8e304 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -8,7 +8,6 @@ #endif struct aggregate_driver; -struct component_master_ops; struct component_match; struct device; struct drm_device; @@ -38,9 +37,6 @@ void drm_of_component_match_add(struct device *master, struct component_match **matchptr, int (*compare)(struct device *, void *), struct device_node *node); -int drm_of_component_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - const struct component_master_ops *m_ops); int drm_of_aggregate_probe(struct device *dev, int (*compare_of)(struct device *, void *), struct aggregate_driver *adrv); @@ -74,14 +70,6 @@ drm_of_component_match_add(struct device *master, { } -static inline int -drm_of_component_probe(struct device *dev, - int (*compare_of)(struct device *, void *), - const struct component_master_ops *m_ops) -{ - return -EINVAL; -} - static inline int drm_of_aggregate_probe(struct device *dev, int (*compare_of)(struct device *, void *), -- https://chromeos.dev