Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp855471pxb; Mon, 25 Oct 2021 20:42:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNoQr/nvkFHa0fMQGpkTUEQ7k6yeBsxs3nq7KfjgvrVlq1irlWw1I2GWPySw2Dh6lZhKQ9 X-Received: by 2002:a17:90b:1004:: with SMTP id gm4mr14941443pjb.32.1635219775963; Mon, 25 Oct 2021 20:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635219775; cv=none; d=google.com; s=arc-20160816; b=BlTr84RLzDkWU7elSA1g7aZ804MpnlSi3uvaQoRDVpZDb85mv+SMKZzRIT1e02wdDi 6IBkPkdkKBSqbgRTFONGazbjQa+hzy2+enSADP8Ad2+SEJHA5Jfu2/00Eh/MDk2Q1/Zo UTYBsWZRh3dUdfX4z7s50kjz7GIPitP4M+4C+9aJvr3pLB6RmihLgi4vz8VmdI4rzYAX DHSDwHWDDoKVPqE7P7SHVO06Gu7MjzcCbN4chd6xludfpwjBgHMHkybqVgNcFvSkMT73 SDvO/PxkW1pssjnS7PAezM4KvT7Mi1BaSxz/ug8dSLSn8MIGTevQp22cYBR9o1tLRqqo la+w== 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 :dkim-signature; bh=yjH6JfZy633Mdr6nuYTumgUfiknsiduwzml/anz47ME=; b=nrtnTnKyFKw49ZDUGpzKWsNiNkDHWGSD7QxjL5ft1HWpUAX7+Tf11/30VhMt2v2mRx NuiJsZ+Y5ZZN97DqSbQbZrq0eLnoi6TAgYb8JRYaNY0cMHrIT3WGvgfT9/w36nwQVgT2 UZyEsODHF0Y0ccusr8PWlCEW0CWYgaJJE7IKqtBHTWXdJ/bTSKxA6oUDhhfnM9Xzk4T5 pcRgCF5X9TjdtVebGWmq9vEvLxBQZZ68SugmZwkfPu08URIsVAx0e/eUk4lP9U+ebYhy DtwNS6+f7EncuXrggxhcJa9TlGRxdtW0XhSW4uKBnIUa7t0PeKUhrGMOhrfAMIgFdG8I dvaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GS7o1pHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si27045493pjl.47.2021.10.25.20.42.41; Mon, 25 Oct 2021 20:42:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GS7o1pHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236092AbhJZAGD (ORCPT + 99 others); Mon, 25 Oct 2021 20:06:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235816AbhJZADj (ORCPT ); Mon, 25 Oct 2021 20:03:39 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1938C061224 for ; Mon, 25 Oct 2021 17:01:15 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id v20so9029181plo.7 for ; Mon, 25 Oct 2021 17:01:15 -0700 (PDT) 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=yjH6JfZy633Mdr6nuYTumgUfiknsiduwzml/anz47ME=; b=GS7o1pHAw3tTsWH7XdqZKIN7bPOPZszkuj6EpYu8zwcOKoGqYqlV9JovaA1E4nJE3j vIbk8YSciBMFPuTDVsOdwKcEqX5M75LpFNJWu+hSDoHPUc/RKACkpvNf5H6XzDoYU3ZB MEgTebOBNPg2Pq0O36DpeosHugWzwzWZvKzS8= 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=yjH6JfZy633Mdr6nuYTumgUfiknsiduwzml/anz47ME=; b=2k77hXt0dL4sGlQqucdWsgSm0Ou5rpcpJZQRh1YB/SpbDUKtCljm3s4kegNEffhlvW RnfGPBQTKqRJD2B0LoqI/MARNin6DXSRqmslfQ3iQOFAJshJDOieifJFpBinLZLYWsa/ Dn6foQNrliAHQhAGELVSReZB+f8cdivZGUvbNM4f0qCkRB4MFP41V5EqyqeJ5a+YC7nO FrxGVKgRTXIMJtbFlA247hVENC8nR7zMSVpR9xCY83twxm62YTxnF8mJpNiHDxyiQC2v X7aUQB6Txs7xEG7edkMYzx2BJQz9WMi0MlKEdzCnYW0s5PU9JGh/wj3GQfgbHOGHoMlk l1AA== X-Gm-Message-State: AOAM532TiioAmU+hsJBrI0KPK8JbaUsvDOYEJ/BleU2wB8qPdEPLUeR0 +dWS5yiHpTfvD2JEYqHUstS+lQ== X-Received: by 2002:a17:902:c214:b0:13f:1b2a:8011 with SMTP id 20-20020a170902c21400b0013f1b2a8011mr19334289pll.3.1635206475063; Mon, 25 Oct 2021 17:01:15 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:f5e3:5eb1:d5ee:6893]) by smtp.gmail.com with ESMTPSA id b7sm9900747pfm.28.2021.10.25.17.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 17:01:14 -0700 (PDT) From: Stephen Boyd To: Greg Kroah-Hartman 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 v3 33/34] component: Get rid of drm_of_component_probe() Date: Mon, 25 Oct 2021 17:00:43 -0700 Message-Id: <20211026000044.885195-34-swboyd@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211026000044.885195-1-swboyd@chromium.org> References: <20211026000044.885195-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 dc4b507c809d..5131e3dbe3a7 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