Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp758079pxb; Fri, 28 Jan 2022 09:19:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbsQOHmLyQfd6u3Nh8LpAflwPK4DUrInu19cYaSBn2DNm9mjZ6+lebXN32U2VRzx5vD1gu X-Received: by 2002:a17:90b:4b01:: with SMTP id lx1mr20299411pjb.52.1643390359180; Fri, 28 Jan 2022 09:19:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643390359; cv=none; d=google.com; s=arc-20160816; b=EqIf48tr4mO3oAPJ0lTDbcrr0R8gimGAIuKdM8mDqdfWidSk9AR1mG7Ae23MfVMdyQ cle5oOJRcPsEW4Dp80Per5OFdH4CcvIbpY6aExD3ADPFKJqFmUqxAPqJ4LS8TwATMCb0 z5EhtV4GXQDPfyrHLJCsjA4GTgS+A/f1LKnQLQ2xsKypku0sG727OzdOdMmvL9hZv8T/ EOdhpQ1/NpMQCa5U4Qgwx6uHKI/3dU9wSmuZc58y7+pgsgiLfTSBDzM0KR/C7qV/ty1N hhdHooPh82ZhuVf/3I59Wk2dqrH51Qkg+r5A7lNRCB7HpQvmuLN5MhTnOsUXzQjX6+wq 2M6g== 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=NWPDgDUwRl+84SzwunIQASVSIexCRProBcGwEVA3ZyQ=; b=QVxAkwenBojlQISmJkIyOvk5mUkkOMfGKkmsD9qsaWnHSDxGMdoAo5dDEOfupDkEo0 YoDx42NDtbmFAxkOMPxBsEHnsy8bdU1BIGIEpP7mShOPOdtyP/7AGqzsXTfpltBRpHvk WDNueLgDQ/Poj31gMqTLuoWZh99BVYcGRXRQg9g9c7WGZDiej01EeTnPr1an5BVGlDGd LqLknLadcBUR87tHxSiTmnNUh54mi5o5M4jwdcOrKZDkrpsggEzFwg9hK1dk0oTyBIYW 9fvMQFcxfgNcAQlCmkrBpkLTUbho8RcrtX1EEH9Vl44J380+6rIH/Rk5A+iow3SAa7di j/sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="oCNz3/Ty"; 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 z1si5229966pfe.46.2022.01.28.09.19.07; Fri, 28 Jan 2022 09:19:19 -0800 (PST) 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="oCNz3/Ty"; 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 S1344000AbiA0UDO (ORCPT + 99 others); Thu, 27 Jan 2022 15:03:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343909AbiA0UCm (ORCPT ); Thu, 27 Jan 2022 15:02:42 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01E6CC0613EB for ; Thu, 27 Jan 2022 12:02:41 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id i186so1323397pfe.0 for ; Thu, 27 Jan 2022 12:02: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=NWPDgDUwRl+84SzwunIQASVSIexCRProBcGwEVA3ZyQ=; b=oCNz3/TyoOC1Z4L+TGEGzc242VDcV1zOa2+4KpqoSchL9yglQa3dROPnlnWmSgibm6 6FdcJLI6inymZ9YaC5K+b7GNCEgYSqJfiA0drHN9+5GRKTc6wlUr9xF8D4rI3iPKD07E +51WbfkKJVTDAand07akDTPtzYj2zVO+3ThYk= 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=NWPDgDUwRl+84SzwunIQASVSIexCRProBcGwEVA3ZyQ=; b=nNcaF2LeM9vJspsvdZTQUhzXXLa5N/V2Ps6wRFdZeh0Fcm7L/ZY5eKn3c5UMr26/u3 Kbc4sT5DBJLjNmw9ClQ4Bh2KyRYLXxS/8YDg8WwCyslyBGtt+BbMMFxxy5ImhNMepxBm msIaBu81aalnZvh/r0bPGmEGvbTimUTTxOOWchICzNFsn0hb3dNw9iuevZSoUhMs9BJC DoYZ+43onGB3QcBVmoVDXZmr5Ni0qlq8rmbiVpybzPDgSvBHxBHtzKCdanklX9vRELw3 jg6NpYRFt/+v3ZV9sRnHYMMCNlhJe6A9LOgGWrQZnY+1lf6XZ7Dkx4CkUwP1clCvsQ3N l1wQ== X-Gm-Message-State: AOAM533VKK19rUxM8+7VpUJguIMUkojfWANI2cte7Qxj2YBZAVWAUPgA KEgvnlJleh/8/yUtGI+IalS8Yg== X-Received: by 2002:a62:e704:: with SMTP id s4mr4171414pfh.25.1643313760477; Thu, 27 Jan 2022 12:02:40 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:9246:1838:3243:3071]) by smtp.gmail.com with ESMTPSA id k21sm6561190pff.33.2022.01.27.12.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 12:02:40 -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 v6 34/35] component: Get rid of drm_of_component_probe() Date: Thu, 27 Jan 2022 12:01:40 -0800 Message-Id: <20220127200141.1295328-35-swboyd@chromium.org> X-Mailer: git-send-email 2.35.0.rc0.227.g00780c9af4-goog In-Reply-To: <20220127200141.1295328-1-swboyd@chromium.org> References: <20220127200141.1295328-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 0fe822319aae..84e285432d13 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 7c7b0d8377a7..4709ff2f04eb 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); @@ -75,14 +71,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