From patchwork Mon Feb 14 06:07:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744922 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 F0AE0C433FE for ; Mon, 14 Feb 2022 06:09:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tooZlTqbaZBvodytaADUdZi65+batlJUmn9b99AdCT4=; b=D/qt6sCkXY2m/S /dNq/pChiEte4cKOiBdstIyxnuGpD4NUwvWIZzoUsPFo+gsrg1z3gvv3Sy4T706JsGEjvo91v/Pht JYxXdFRxugMSdh+mQuIRRLByZ4VcTLOTG+820ydHQXinyFdedsJyJfl/fxlpWnJbbOLZczJSiTYG2 EAYjp/dzPxRvzgyvxohhaeArV0dv+7lW77Dbv3VZu9bAsBWNfMWA25jFJwnIXGi7dpD3BVzRWtrSA apqec/V9wC0HK/s851LTgEWe9kIF9VDb5MxIvyu/pkwHAA2VfD88VZDKnKqvf6PkrpuuhBWOwFdAe kEP6tfeCM8Tly7NbltWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUYH-00DJSB-VU; Mon, 14 Feb 2022 06:09:33 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUXu-00DJJg-OH; Mon, 14 Feb 2022 06:09:12 +0000 X-UUID: 68f19dada9a948bda1bea5100492d223-20220213 X-UUID: 68f19dada9a948bda1bea5100492d223-20220213 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 268987049; Sun, 13 Feb 2022 23:09:07 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:09:05 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:09:03 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:09:01 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Rafael J. Wysocki" Subject: [PATCH 01/23] component: Add common helper for compare/release functions Date: Mon, 14 Feb 2022 14:07:57 +0800 Message-ID: <20220214060819.7334-2-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_220910_818799_505E99DF X-CRM114-Status: GOOD ( 15.67 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The component requires the compare/release functions, there are so many copies in current kernel. Just define four common helpers for them. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Yong Wu --- I have run "make htmldocs". Due to my poor english, If the grammer is wrong or need more comments, please help to correct or supplement. Thanks. --- drivers/base/component.c | 58 +++++++++++++++++++++++++++++++++++++++ include/linux/component.h | 6 ++++ 2 files changed, 64 insertions(+) diff --git a/drivers/base/component.c b/drivers/base/component.c index 2d25a6416587..3d72d2820d7d 100644 --- a/drivers/base/component.c +++ b/drivers/base/component.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -287,6 +288,63 @@ static void take_down_master(struct master *master) } } +/** + * component_compare_of - A common component compare function for of_node + * @dev: component device + * @data: @compare_data from component_match_add_release() + * + * A common compare function when compare_data is device of_node. e.g. + * component_match_add_release(masterdev, &match, component_release_of, + * component_compare_of, component_dev_of_node) + */ +int component_compare_of(struct device *dev, void *data) +{ + return device_match_of_node(dev, data); +} +EXPORT_SYMBOL_GPL(component_compare_of); + +/** + * component_release_of - A common component release function for of_node + * @dev: component device + * @data: @compare_data from component_match_add_release() + * + * About the example, Please see component_compare_of(). + */ +void component_release_of(struct device *dev, void *data) +{ + of_node_put(data); +} +EXPORT_SYMBOL_GPL(component_release_of); + +/** + * component_compare_dev - A common component compare function for dev + * @dev: component device + * @data: @compare_data from component_match_add_release() + * + * A common compare function when compare_data is struce device. e.g. + * component_match_add(masterdev, &match, component_compare_dev, component_dev) + */ +int component_compare_dev(struct device *dev, void *data) +{ + return dev == data; +} +EXPORT_SYMBOL_GPL(component_compare_dev); + +/** + * component_compare_dev_name - A common component compare function for device name + * @dev: component device + * @data: @compare_data from component_match_add_release() + * + * A common compare function when compare_data is device name string. e.g. + * component_match_add(masterdev, &match, component_compare_dev_name, + * "component_dev_name") + */ +int component_compare_dev_name(struct device *dev, void *data) +{ + return device_match_name(dev, data); +} +EXPORT_SYMBOL_GPL(component_compare_dev_name); + static void devm_component_match_release(struct device *parent, void *res) { struct component_match *match = res; diff --git a/include/linux/component.h b/include/linux/component.h index 16de18f473d7..6bc1c6e7f76d 100644 --- a/include/linux/component.h +++ b/include/linux/component.h @@ -82,6 +82,12 @@ struct component_master_ops { void (*unbind)(struct device *master); }; +/* A set helper functions for component compare/release */ +int component_compare_of(struct device *dev, void *data); +void component_release_of(struct device *dev, void *data); +int component_compare_dev(struct device *dev, void *data); +int component_compare_dev_name(struct device *dev, void *data); + void component_master_del(struct device *, const struct component_master_ops *); From patchwork Mon Feb 14 06:07:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744923 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2C306C433F5 for ; Mon, 14 Feb 2022 06:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EWNkZdhMgMVFI3DZp2BwoHiJJhMbZMrt+mpXoGiDMxM=; b=SCfzJ1MLA9SWEl LkFMzmmiufw/m3qELKDWstpQBtMe1KknGmfZBLZkQme875xvU57qAUYGKtO09wFK7i715UKATGuWv kWgt/ztMWVxBSnJcP+WX7A/5wJNuNNWu2qIkigTBtQxwrUU9aVl3ztFu6/6y1QoRs/Lc6Iq/MHHyQ nCMQQxQTzSqLsmOzS45ZHCmihB2zEi13pCrgasI14Dsco3IYBDe0ggjf5+u/1XhY5oPfrjoAhsiXh eD77Vmi13dUtx4Cw4Llkm3UPm3J7xKE0vX2lTq9tFiiRoYPH4MrmXaA90eePR8gafOPC7NRMU7e8C p3OgGbf8bMyPKZRgEOoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUYI-00DJSr-Vd; Mon, 14 Feb 2022 06:09:34 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUY4-00DJN6-TV; Mon, 14 Feb 2022 06:09:22 +0000 X-UUID: 5aee13a932e94ec29341249832347543-20220213 X-UUID: 5aee13a932e94ec29341249832347543-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 140712359; Sun, 13 Feb 2022 23:09:18 -0700 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:09:17 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:09:15 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:09:13 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Mihail Atanassov" , Brian Starkey Subject: [PATCH 02/23] drm/komeda: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:07:58 +0800 Message-ID: <20220214060819.7334-3-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_220920_982551_216E5C18 X-CRM114-Status: GOOD ( 11.65 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey Signed-off-by: Yong Wu --- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index e7933930a657..c325872699ec 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -92,11 +92,6 @@ static const struct component_master_ops komeda_master_ops = { .unbind = komeda_unbind, }; -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static void komeda_add_slave(struct device *master, struct component_match **match, struct device_node *np, @@ -106,7 +101,7 @@ static void komeda_add_slave(struct device *master, remote = of_graph_get_remote_node(np, port, endpoint); if (remote) { - drm_of_component_match_add(master, match, compare_of, remote); + drm_of_component_match_add(master, match, component_compare_of, remote); of_node_put(remote); } } From patchwork Mon Feb 14 06:07:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744924 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5B90DC433EF for ; Mon, 14 Feb 2022 06:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/UVEgL1KoIOryRui/0Ofc3w+cVEsrvJ3sBUU/HIsu4k=; b=QvGEjBYkKgkL68 V3qXSSffpeS2ZCkFkyoJJfaN+cRAZxuo/Bgc5UW7fctG5QuyCiS46ZduaiUvvMFKDVOPqdFexL9VO FWyhZjeZiKeVBqXdxtX9i0COdyS1MoCt51yNVoh9BTGirm5hxR21/3+0mzSyA1SxM1hn+W0i4yrWb KO3mNu7LlPJTEYSRh0TxMurAywPit4zlmzdOiU2b8BPovUtOv7E4WkhjABpsdsxOvebjtrZsjXIa+ eE3OhVhu5TiHKrzHDX6KOZkHX4WzDxTo5PHrUheFmtwGqDmbea1/MWQODvl5hL9xbXYZ40Q1r3DGV zBvNlxF0XBa0Qvibnqig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUYh-00DJip-Gd; Mon, 14 Feb 2022 06:09:59 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUYG-00DJRR-J0; Mon, 14 Feb 2022 06:09:33 +0000 X-UUID: 3cdb7a8d8ebc442095ecfacbba44a53a-20220213 X-UUID: 3cdb7a8d8ebc442095ecfacbba44a53a-20220213 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1918206077; Sun, 13 Feb 2022 23:09:31 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:09:29 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:09:28 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:09:26 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Russell King" Subject: [PATCH 03/23] drm/armada: Make use of the helper component_compare_of/dev_name Date: Mon, 14 Feb 2022 14:07:59 +0800 Message-ID: <20220214060819.7334-4-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_220932_661982_926DACA8 X-CRM114-Status: GOOD ( 14.36 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helpers from component. Cc: Russell King Signed-off-by: Yong Wu --- drivers/gpu/drm/armada/armada_drv.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index 8e3e98f13db4..224607a6ae16 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -177,17 +177,6 @@ static void armada_drm_unbind(struct device *dev) drm_mm_takedown(&priv->linear); } -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - -static int compare_dev_name(struct device *dev, void *data) -{ - const char *name = data; - return !strcmp(dev_name(dev), name); -} - static void armada_add_endpoints(struct device *dev, struct component_match **match, struct device_node *dev_node) { @@ -196,7 +185,7 @@ static void armada_add_endpoints(struct device *dev, for_each_endpoint_of_node(dev_node, ep) { remote = of_graph_get_remote_port_parent(ep); if (remote && of_device_is_available(remote)) - drm_of_component_match_add(dev, match, compare_of, + drm_of_component_match_add(dev, match, component_compare_of, remote); of_node_put(remote); } @@ -213,7 +202,7 @@ static int armada_drm_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; int ret; - ret = drm_of_component_probe(dev, compare_dev_name, &armada_master_ops); + ret = drm_of_component_probe(dev, component_compare_dev_name, &armada_master_ops); if (ret != -EINVAL) return ret; @@ -223,7 +212,7 @@ static int armada_drm_probe(struct platform_device *pdev) int i; for (i = 0; devices[i]; i++) - component_match_add(dev, &match, compare_dev_name, + component_match_add(dev, &match, component_compare_dev_name, devices[i]); if (i == 0) { From patchwork Mon Feb 14 06:08:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744925 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3242BC433F5 for ; Mon, 14 Feb 2022 06:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eElFK0wr5fmyt1OtW8irIvRc0ape47qdpo8yqmw89SM=; b=j6uJYnXhYsGMD5 OFh0VqPojRsd2mPlQmSn55jKpd7NIz7OjwHstdDmr2GTT6jCXo4ybcmpK0RZtgkzBXjq+1XaJSgTL bbO4x1FipBbpckKaNcGXzk1ZtVv3Ot2MMYDO3I90tOvCDSROWtCSQ5ofXWKArmUpDm1VlQzY0TlEE pnYJZy1wIdBjk6BzZpvpB63UYIebZKwbkykKHsejhrg8+2yNGZqQn48oy2zH45qB37Kf4KSl52fwe 7BQE2IDFl4E0FHZx8koN/lFiTbXBbY1MauCW1X8s9cIrTwmScJI17jRorMTa232pFE4i8r88vmJr4 pIu/7zld/cYIfnU/AGGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUZ1-00DJyP-JD; Mon, 14 Feb 2022 06:10:19 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUYS-00DJZ4-VD; Mon, 14 Feb 2022 06:09:47 +0000 X-UUID: 3cab325a0fc4498382322c0bbb547b0a-20220213 X-UUID: 3cab325a0fc4498382322c0bbb547b0a-20220213 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1242730289; Sun, 13 Feb 2022 23:09:42 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:09:41 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:09:33 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:09:32 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Lucas Stach" , Russell King , Christian Gmeiner , Subject: [PATCH 04/23] drm/etnaviv: Make use of the helper component_compare_of/dev_name Date: Mon, 14 Feb 2022 14:08:00 +0800 Message-ID: <20220214060819.7334-5-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_220945_034608_73399E84 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helpers from component. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: etnaviv@lists.freedesktop.org Signed-off-by: Yong Wu --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 0b756ecb1bc2..1d2b4fb4bcf8 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -574,18 +574,6 @@ static const struct component_master_ops etnaviv_master_ops = { .unbind = etnaviv_unbind, }; -static int compare_of(struct device *dev, void *data) -{ - struct device_node *np = data; - - return dev->of_node == np; -} - -static int compare_str(struct device *dev, void *data) -{ - return !strcmp(dev_name(dev), data); -} - static int etnaviv_pdev_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -603,14 +591,14 @@ static int etnaviv_pdev_probe(struct platform_device *pdev) first_node = core_node; drm_of_component_match_add(&pdev->dev, &match, - compare_of, core_node); + component_compare_of, core_node); } } else { char **names = dev->platform_data; unsigned i; for (i = 0; names[i]; i++) - component_match_add(dev, &match, compare_str, names[i]); + component_match_add(dev, &match, component_compare_dev_name, names[i]); } /* From patchwork Mon Feb 14 06:08:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744963 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 38E2FC433EF for ; Mon, 14 Feb 2022 06:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RrUg3hW2OIzqMIrH3HtasE//YuPIj7yf/ERtUL8v1VI=; b=m7zje2oIK0OjFm S2poU9GS4EH71lV8NrDSWqRk8rcIpDXZsjvaITy7LcXvqKvEJ5nsA6KxQnnvg3Dukwd8OwYUwjR3J S3rqj8IvUsVhc+IutyoOGstuVn4GaojTTJS0HB9sLi/4jT4gBO93YYRrFINql/9lSlodjVaBHRi0g taThXto+uS75sloDATusypqov7cC4CCIFbOcviiXks0T48hZLRb4SasOz4I8v2dalIv0sXYLQm0fO q4arMLg7drL193QARx+AbF3p0L4ym5dTCtx9Aij086+uVFNHH94KUixN79B2d9rx2fmJeYCiUzyrc ZyFlncbnc8DyFvYkcu1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUdH-00DMlT-M4; Mon, 14 Feb 2022 06:14:43 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUb3-00DLQN-OS; Mon, 14 Feb 2022 06:12:31 +0000 X-UUID: 6fbfcd6290804cf2a64509f63d185383-20220213 X-UUID: 6fbfcd6290804cf2a64509f63d185383-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 124238089; Sun, 13 Feb 2022 23:12:09 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:09:46 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:09:44 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:09:42 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Xinliang Liu" , Tian Tao , "John Stultz" , Xinwei Kong , Chen Feng , Thomas Zimmermann , Hao Fang Subject: [PATCH 05/23] drm/hirin: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:01 +0800 Message-ID: <20220214060819.7334-6-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_221225_845635_10AD21EA X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Xinliang Liu Cc: Tian Tao Cc: John Stultz Cc: Xinwei Kong Cc: Chen Feng Cc: Thomas Zimmermann Cc: Laurent Pinchart Cc: Hao Fang Signed-off-by: Yong Wu --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 98ae9a48f3fe..8041ec11bd48 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -203,11 +203,6 @@ static int kirin_drm_kms_init(struct drm_device *dev, return ret; } -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int kirin_drm_kms_cleanup(struct drm_device *dev) { drm_kms_helper_poll_fini(dev); @@ -278,7 +273,7 @@ static int kirin_drm_platform_probe(struct platform_device *pdev) if (!remote) return -ENODEV; - drm_of_component_match_add(dev, &match, compare_of, remote); + drm_of_component_match_add(dev, &match, component_compare_of, remote); of_node_put(remote); return component_master_add_with_match(dev, &kirin_drm_ops, match); From patchwork Mon Feb 14 06:08:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744928 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 81BBDC433F5 for ; Mon, 14 Feb 2022 06:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t3l4EP/Htz6SVr9TW2jkbP92CoDSOk3SlrH5nKQJCBU=; b=kKYIPLBGE7upnO 4KA30btlTDpImZENVateztCBlUlD/0ISb+Y60bELSCe1Ucf6NxuDh1Rp9XnVLs/GQO7Butwc2IkEn GWh4KvhulUHzSi1sKefxdpdEt+YismB8Vz3Cl8NlrGeJhKdZnb71DyGnVuwUi/KPFYU8lnJTdn3eX Nc9osM+1QlWMuQ19CT+J9hJnZ9uVkDhmdo3BkR6g61pxiH6G42/lwQeb2JmLFnw3Qatzy9Kwwcpbz 20jVw/KcNk6Fgfs+CqTmb8pCi/1jgUBnf7TQl2ub647R5MEVLJQ1o+UhlKcpCM1ODsmg3FWav9T81 0nQtQBHxiIGlq90NMyXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUbJ-00DLbO-85; Mon, 14 Feb 2022 06:12:41 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUay-00DLPk-A1; Mon, 14 Feb 2022 06:12:22 +0000 X-UUID: 005fa5e6cb404e5d84fe18662f400bee-20220213 X-UUID: 005fa5e6cb404e5d84fe18662f400bee-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2046101459; Sun, 13 Feb 2022 23:12:09 -0700 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:09:55 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:09:53 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:09:51 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Paul Cercueil" , Subject: [PATCH 06/23] drm/ingenic: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:02 +0800 Message-ID: <20220214060819.7334-7-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_221220_378345_67CC4F3A X-CRM114-Status: GOOD ( 11.54 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Paul Cercueil Cc: linux-mips@vger.kernel.org Signed-off-by: Yong Wu Acked-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index b4943a56be09..23b8f012b418 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -1322,11 +1322,6 @@ static int ingenic_drm_bind_with_components(struct device *dev) return ingenic_drm_bind(dev, true); } -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static void ingenic_drm_unbind(struct device *dev) { struct ingenic_drm *priv = dev_get_drvdata(dev); @@ -1360,7 +1355,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) if (!np) return ingenic_drm_bind(dev, false); - drm_of_component_match_add(dev, &match, compare_of, np); + drm_of_component_match_add(dev, &match, component_compare_of, np); of_node_put(np); return component_master_add_with_match(dev, &ingenic_master_ops, match); From patchwork Mon Feb 14 06:08:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744926 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 29751C433FE for ; Mon, 14 Feb 2022 06:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hgHd5x1AvW9V/2i0QHsKUMLIsE1DGChgI0oUwelhD1E=; b=d7RZXHwqk/v8YZ AZLTTWftFbL8/WFtMyH9ureIf4pI36MQI29zOu+eYwkvXdtuE6QPhAo+7K764HULQWgHcuhOMqZk0 1wMvziyJzPjcQZbRE5724VArBxzmak9XcFH4NlbI/iVhh1SgQqf5+6wtDHw8vTLy6dDHDu800zLqj cmZzsk7olt81JkAjmQ+616Q0lWbJbkUaOTzYOv9k+N9zTryuEAMXBZoJZSTU1lcfMo1ZiqnMeuAmK mb1dfCQLOYRV3udZOHjsP3W52hs5fi2M0z74EHxfjZ+h9oNBhW+4tGCSVJanlcJqzWXGLMEQ71dn7 qqmEVP/Fyrp0WDaqEUtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUZ5-00DK10-Kv; Mon, 14 Feb 2022 06:10:23 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUYo-00DJoT-VT; Mon, 14 Feb 2022 06:10:08 +0000 X-UUID: 54a48fdf587e4385bec0953206e88fce-20220213 X-UUID: 54a48fdf587e4385bec0953206e88fce-20220213 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 353672927; Sun, 13 Feb 2022 23:10:04 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:10:02 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:10:00 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:09:59 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Philipp Zabel" Subject: [PATCH 07/23] drm/mediatek: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:03 +0800 Message-ID: <20220214060819.7334-8-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_221007_062368_B8505546 X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Yong Wu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 56ff8c57ef8f..cd14399eaf8f 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -369,11 +369,6 @@ static const struct drm_driver mtk_drm_driver = { .minor = DRIVER_MINOR, }; -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int mtk_drm_bind(struct device *dev) { struct mtk_drm_private *private = dev_get_drvdata(dev); @@ -614,7 +609,7 @@ static int mtk_drm_probe(struct platform_device *pdev) comp_type == MTK_DSI) { dev_info(dev, "Adding component match for %pOF\n", node); - drm_of_component_match_add(dev, &match, compare_of, + drm_of_component_match_add(dev, &match, component_compare_of, node); } From patchwork Mon Feb 14 06:08:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744978 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DE861C433F5 for ; Mon, 14 Feb 2022 06:23:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xidGC47A7QtCOS00VKvwlD+oQ0rWvl5eJIfyqZTeXOM=; b=EMw0wP1WMxBfo3 WR1vMJxqvt0fIgF5FA7iJ6CTqGnHZ9awSxtHnGWuyuaoT/NuOiMEzrNM1P0cZsxc7WUqeyn/DulPb 2otlscgwxS2kE6tF7kgHm6EMHTbXp7MRaOqeEBHeyi/aWWR76L165x825JhI1cU/F6OEAl6GT1lRe BQW/HN968/7U9Gqd0YFJjtEjipPZpnrKztAM8afTiaNLqFKFlcCtTciaGlvOjXgbzvZrKQyFFWU1t OwEBQWI5OG3nM+BBYHyFQqoeX/tX/d0v6ro2Nthp0mjAQgkOH0gJpEGLbajWE3SnnpzDPfPSzWgU4 HOP0AdDjtNo4jiNkW4sg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUlr-00DQKe-JR; Mon, 14 Feb 2022 06:23:35 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUii-00DOhC-BB; Mon, 14 Feb 2022 06:20:22 +0000 X-UUID: 4cb7e01c10bc4901a67704a5a6b92253-20220213 X-UUID: 4cb7e01c10bc4901a67704a5a6b92253-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1995041077; Sun, 13 Feb 2022 23:20:13 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:10:11 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:10:09 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:10:08 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Neil Armstrong" , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Subject: [PATCH 08/23] drm/meson: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:04 +0800 Message-ID: <20220214060819.7334-9-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222020_406631_BA4EF841 X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Neil Armstrong Cc: Kevin Hilman Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org Signed-off-by: Yong Wu --- drivers/gpu/drm/meson/meson_drv.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 80f1d439841a..3a9768a135bb 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -423,14 +423,6 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev) return drm_mode_config_helper_resume(priv->drm); } -static int compare_of(struct device *dev, void *data) -{ - DRM_DEBUG_DRIVER("Comparing of node %pOF with %pOF\n", - dev->of_node, data); - - return dev->of_node == data; -} - static void meson_drv_shutdown(struct platform_device *pdev) { struct meson_drm *priv = dev_get_drvdata(&pdev->dev); @@ -473,7 +465,7 @@ static int meson_drv_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "parent %pOF remote match add %pOF parent %s\n", np, remote, dev_name(&pdev->dev)); - component_match_add(&pdev->dev, &match, compare_of, remote); + component_match_add(&pdev->dev, &match, component_compare_of, remote); of_node_put(remote); From patchwork Mon Feb 14 06:08:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744976 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3CD8EC433F5 for ; Mon, 14 Feb 2022 06:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rtAlfYMQ+r8375v8R56aLdrgvMV+wdDZVGZKmlyosZY=; b=VeY8Aca3lSExBv 6qQFX/jjOtszlY0+N0GcfP4dmxgjHn7LoRMcHoQDv9epzw/grwmT4sW40OE2SxI2+LyKSfbsT2436 h6lJG2P/LX1iiVFGUPcgZOCx1QsZXdcmehf2w1q4nZx5joUP2M1FulARbL/rMUvOgV4fTIIc4Mc6w 7eSGYwBbltihgOJQ2ACJfwxw+IRvmeXGvv0dL8V4fLBgmvTfiAjbaO8bpJZy7MH+9rHz00TIbngWl VWmnTFjiPAuVeA8iV3fMuAQkGhdhoRZHTNqMjb4fhYVow42OO2NAhdhy0W1o/IUGHJTkIfveOxDpM VfysUMmYWVSq5ph5GB5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUkn-00DPgE-PV; Mon, 14 Feb 2022 06:22:29 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUig-00DOhM-T3; Mon, 14 Feb 2022 06:20:20 +0000 X-UUID: 45a61f972b0d48a2afb881dcc623daa1-20220213 X-UUID: 45a61f972b0d48a2afb881dcc623daa1-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1846386489; Sun, 13 Feb 2022 23:20:13 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:10:22 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:10:21 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:10:19 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , Sean Paul , Abhinav Kumar , , Subject: [PATCH 09/23] drm/msm: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:05 +0800 Message-ID: <20220214060819.7334-10-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222019_017583_47AA8818 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Rob Clark Cc: Sean Paul Cc: Abhinav Kumar Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Yong Wu --- drivers/gpu/drm/msm/msm_drv.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index ad35a5d94053..50e5a6ff6487 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1173,15 +1173,6 @@ static const struct dev_pm_ops msm_pm_ops = { * Componentized driver support: */ -/* - * NOTE: duplication of the same code as exynos or imx (or probably any other). - * so probably some room for some helpers - */ -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - /* * Identify what components need to be added by parsing what remote-endpoints * our MDP output ports are connected to. In the case of LVDS on MDP4, there @@ -1239,7 +1230,7 @@ static int add_components_mdp(struct device *mdp_dev, if (of_device_is_available(intf)) drm_of_component_match_add(master_dev, matchptr, - compare_of, intf); + component_compare_of, intf); of_node_put(intf); } @@ -1285,7 +1276,7 @@ static int add_display_components(struct platform_device *pdev, put_device(mdp_dev); /* add the MDP component itself */ - drm_of_component_match_add(dev, matchptr, compare_of, + drm_of_component_match_add(dev, matchptr, component_compare_of, mdp_dev->of_node); break; case KMS_MDP4: @@ -1324,7 +1315,7 @@ static int add_gpu_components(struct device *dev, return 0; if (of_device_is_available(np)) - drm_of_component_match_add(dev, matchptr, compare_of, np); + drm_of_component_match_add(dev, matchptr, component_compare_of, np); of_node_put(np); From patchwork Mon Feb 14 06:08:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744972 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 73D1BC433EF for ; Mon, 14 Feb 2022 06:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kaucdnOPVHeXfY6X37miBLgDQt2QIyViJ4YgMErdTGg=; b=1NANal/6FcyHll WCT97GOmSDmy7EEnX3UtaLvbOeb19e7UMrkZ9ZBxQg2C9HW9LEUULVSfpZt/xtbpIajsAI+Cw2wyf 02r0wQYnEvmGQ2CFrRXYuVzdz8JVucrGyCuo0IqyYnhOzs1KvaiDm2JxomZjTTTGOy7o6fYqKGV0o RNLoIqYrSNV/+ZHf+UNSmkR74zieDb6kZpeE1aAec1DTYSGC3xXbvxuaSOcHniuczviiW+Zb8UNjl P2voFIUwKDocctYSHVzhfPAoHW8F9Z3q0NgR/0HvCny0dyN6SmXopPDDVGvUeb+VYxua5FSVIhbvu 9ANnugSGW3SAzvONexIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjG-00DOsk-Ca; Mon, 14 Feb 2022 06:20:54 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUid-00DOhC-NT; Mon, 14 Feb 2022 06:20:17 +0000 X-UUID: 51fb8c5be3704fd8934a056b483a08be-20220213 X-UUID: 51fb8c5be3704fd8934a056b483a08be-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 467215582; Sun, 13 Feb 2022 23:20:13 -0700 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:10:32 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:10:30 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:10:28 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Orson Zhai" , Baolin Wang , "Chunyan Zhang" , Kevin Tang , "Maarten Lankhorst" , Maxime Ripard Subject: [PATCH 10/23] drm/sprd: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:06 +0800 Message-ID: <20220214060819.7334-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222015_803154_2582CF67 X-CRM114-Status: GOOD ( 12.03 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Kevin Tang Cc: Maarten Lankhorst Cc: Maxime Ripard Signed-off-by: Yong Wu --- drivers/gpu/drm/sprd/sprd_drm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/sprd/sprd_drm.c b/drivers/gpu/drm/sprd/sprd_drm.c index a077e2d4d721..5d534a8db913 100644 --- a/drivers/gpu/drm/sprd/sprd_drm.c +++ b/drivers/gpu/drm/sprd/sprd_drm.c @@ -134,14 +134,9 @@ static const struct component_master_ops drm_component_ops = { .unbind = sprd_drm_unbind, }; -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int sprd_drm_probe(struct platform_device *pdev) { - return drm_of_component_probe(&pdev->dev, compare_of, &drm_component_ops); + return drm_of_component_probe(&pdev->dev, component_compare_of, &drm_component_ops); } static int sprd_drm_remove(struct platform_device *pdev) From patchwork Mon Feb 14 06:08:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744992 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A92C5C433EF for ; Mon, 14 Feb 2022 06:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2VbFbZAFdpdB/b8+k2vy8e4AZlu1sKBSi6FaLVqz9aU=; b=1E3cokoZBSQGLK xdBJqURTaTEkZ2niui9iBIA/mQP1mBj3CuwShgotmn3ZsXtMBz8iCqjGUbmhQ82jJfH6NJFOGxvz1 Cw34TJONqb/nO0tMTKKNuf/aX8CoxY4D/i0btv8sZ0lizZGnzCewerCS1NV8Ox7ppzaiSvwazCC/D PGbpib9rhqsXHmohojzxL0TiPhA0XMm6Ijki1wqb5FMZ0m3S9aT5T40eufUA+zUOGOJMNw+0sfBzO E2Ef3L/H8s4d+cjJaeRSxqE/wvzwCV73aa3GCPxgvi8EcuukN72uwxK2n3PXyAisqbClBZG5de247 mcCL/pHXmSgC/pMq3IXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUnX-00DRID-EE; Mon, 14 Feb 2022 06:25:19 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjH-00DOtP-Md; Mon, 14 Feb 2022 06:21:01 +0000 X-UUID: 0744a3b7164e4e31a476745f5290ef48-20220213 X-UUID: 0744a3b7164e4e31a476745f5290ef48-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1540492839; Sun, 13 Feb 2022 23:20:53 -0700 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:10:51 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:10:49 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:10:47 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Benjamin Gaignard" Subject: [PATCH 11/23] drm/sti: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:07 +0800 Message-ID: <20220214060819.7334-12-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222055_770597_34345F0A X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Benjamin Gaignard Signed-off-by: Yong Wu --- drivers/gpu/drm/sti/sti_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index c7efb43b83ee..890c3103f6bd 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -144,11 +144,6 @@ static const struct drm_driver sti_driver = { .minor = DRIVER_MINOR, }; -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int sti_init(struct drm_device *ddev) { struct sti_private *private; @@ -244,7 +239,7 @@ static int sti_platform_probe(struct platform_device *pdev) child_np = of_get_next_available_child(node, NULL); while (child_np) { - drm_of_component_match_add(dev, &match, compare_of, + drm_of_component_match_add(dev, &match, component_compare_of, child_np); child_np = of_get_next_available_child(node, child_np); } From patchwork Mon Feb 14 06:08:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744974 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DC7CBC433EF for ; Mon, 14 Feb 2022 06:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b7CNsn1h8ZhV4ZMX5oEZF6pZk6j6CF6MmiOV/hmFF7E=; b=Kt84LRO98B2deV eD8/mw+spcTiblibnVvY3cQA0c86V7jJncGsC6Qb0M8Wpx+8ImuxqyFJ7/5TVfwy4wfL2NHiKAeUF j68Alprkkc+OJ5wUU08anzMZ5Q260GQl9PlYvQzMeypiLp/ItsRXD3ve+3YqoegsVgKSs1JaqKtrA a4RUs7/I41TJHczfiOLdKM13DvlUCi3KtNHt0ibwH4HaeeO0/sZ82xAWWEdoxvcIJqv0siqLgNiXq S6zG540+sS7rTsedsNlWcRxOn496Q6AarP9agLvx4WjQ3Toz2PHX/AwblyMzDF9FTg3jSALg287/R y9cfPLcugDt2EKWXoL2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjh-00DP5P-IT; Mon, 14 Feb 2022 06:21:21 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUif-00DOhC-9h; Mon, 14 Feb 2022 06:20:18 +0000 X-UUID: 755aed7197d1476ab6fdee18d91cf714-20220213 X-UUID: 755aed7197d1476ab6fdee18d91cf714-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1894470728; Sun, 13 Feb 2022 23:20:13 -0700 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:10:57 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:10:56 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:10:54 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Maxime Ripard" , Chen-Yu Tsai , Jernej Skrabec , Subject: [PATCH 12/23] drm/sun4i: Make use of the helper component_compare_of Date: Mon, 14 Feb 2022 14:08:08 +0800 Message-ID: <20220214060819.7334-13-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222017_402023_BE28C2AE X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: linux-sunxi@lists.linux.dev Signed-off-by: Yong Wu --- drivers/gpu/drm/sun4i/sun4i_drv.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index b630614b3d72..a3e3e51c600d 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -201,15 +201,6 @@ static bool sun4i_drv_node_is_tcon_top(struct device_node *node) !!of_match_node(sun8i_tcon_top_of_table, node); } -static int compare_of(struct device *dev, void *data) -{ - DRM_DEBUG_DRIVER("Comparing of node %pOF with %pOF\n", - dev->of_node, - data); - - return dev->of_node == data; -} - /* * The encoder drivers use drm_of_find_possible_crtcs to get upstream * crtcs from the device tree using of_graph. For the results to be @@ -329,7 +320,7 @@ static int sun4i_drv_add_endpoints(struct device *dev, of_device_is_available(node))) { /* Add current component */ DRM_DEBUG_DRIVER("Adding component %pOF\n", node); - drm_of_component_match_add(dev, match, compare_of, node); + drm_of_component_match_add(dev, match, component_compare_of, node); count++; } From patchwork Mon Feb 14 06:08:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744930 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B98F1C433F5 for ; Mon, 14 Feb 2022 06:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HBZm6UWZz6j+iA1iRA+OOvcs2Nuje1lWtQVvMFF+bH0=; b=Az+Pota7YFp5pW teh1y6Frn1a3+nytAnmHhqJ5iXxcqTYBIEKA30pNbxd020aj8IN+zB98nJQ7WiTrqghmlwBQqR4Xj ScFW2CqGLZSSD37pp8ZgRq6ZOpH7Z1UnKbEmINhocNSy73UIE2I3mSRd64AK8QriHpsEBq+Uzu9Vd XgK6R4Phg7ZR/puDpBAlZhxUpHDYasLutnnfa9dT7saWcqyoI8U1ZnPGO2qNuOdqlnqlxCn8HSFXH vizhMHLOdLJsMymC3YqGkHNho6B3TK7S2rWZ5KYf6DHE0VPg5aNcZSTIPivRKr1drpAeUMwYJoMs3 nFggaWCTgMCB8dXZbrsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUcG-00DM9B-N8; Mon, 14 Feb 2022 06:13:40 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUax-00DLQN-U2; Mon, 14 Feb 2022 06:12:25 +0000 X-UUID: f550aa210f9a47bb969fa856ea28570c-20220213 X-UUID: f550aa210f9a47bb969fa856ea28570c-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1199787540; Sun, 13 Feb 2022 23:12:09 -0700 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:11:08 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:11:05 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:03 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Sandy Huang" , =?utf-8?q?Heiko_St=C2=A8=C2=B9bner?= , Subject: [PATCH 13/23] drm/rockchip: Make use of the helper component_compare_dev Date: Mon, 14 Feb 2022 14:08:09 +0800 Message-ID: <20220214060819.7334-14-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_221220_028328_DE3A203D X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Sandy Huang Cc: "Heiko St¨¹bner" Cc: linux-rockchip@lists.infradead.org Signed-off-by: Yong Wu Acked-by: Heiko Stuebner --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index bec207de4544..3c2f2d6ecc36 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -290,11 +290,6 @@ int rockchip_drm_endpoint_is_subdriver(struct device_node *ep) return false; } -static int compare_dev(struct device *dev, void *data) -{ - return dev == (struct device *)data; -} - static void rockchip_drm_match_remove(struct device *dev) { struct device_link *link; @@ -321,7 +316,7 @@ static struct component_match *rockchip_drm_match_add(struct device *dev) break; device_link_add(dev, d, DL_FLAG_STATELESS); - component_match_add(dev, &match, compare_dev, d); + component_match_add(dev, &match, component_compare_dev, d); } while (true); } From patchwork Mon Feb 14 06:08:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744975 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 706F5C433EF for ; Mon, 14 Feb 2022 06:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EHfqo4wcYIkNmG4Kx9yaYZxHj1UMsfuK49bsu6PaONM=; b=g1MvHAXeckBU3v Tp969NWgQk5FkRnLazMXVDf/412ZFYJkTdzCaFZszfV4dI34zjF0fDcIi8nO7BLU5g2CzlU7135/q orFUqrJdoXnCxZJo0WdVF2zfypsYUL8FjsZBwfWIlwsnvHULlDshRsjXmr8CwN5ovSIVmUGmW+mly 8Kr54Dr2KJc3BmxYftl2Qq0NQHXKqZUvW68HjvZIsp/IWafcmXpZuctnuilH0Vu50ic/nVt0URb4A lZhv8WlhTxqVleCeuXI2Qt5xrwNb1D9WbBcojY7x4tehuD4U2EeqJyL+XTR452Uk8Cdhe7cWMIdO/ kVdlAzELM007akYdyFQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUkl-00DPf9-Bi; Mon, 14 Feb 2022 06:22:27 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUig-00DOhC-Nv; Mon, 14 Feb 2022 06:20:20 +0000 X-UUID: 9fa1d0ff9acc4366b4c7f3bffd572eeb-20220213 X-UUID: 9fa1d0ff9acc4366b4c7f3bffd572eeb-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1781576668; Sun, 13 Feb 2022 23:20:13 -0700 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:11:12 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:11:10 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:09 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , Inki Dae , Joonyoung Shim , "Seung-Woo Kim" , Kyungmin Park , Subject: [PATCH 14/23] drm/exynos: Make use of the helper component_compare_dev Date: Mon, 14 Feb 2022 14:08:10 +0800 Message-ID: <20220214060819.7334-15-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222018_804301_764476B6 X-CRM114-Status: GOOD ( 12.24 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Krzysztof Kozlowski Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Yong Wu --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 9743b6b17447..d8b49a3c9b0f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -212,11 +212,6 @@ static struct exynos_drm_driver_info exynos_drm_drivers[] = { } }; -static int compare_dev(struct device *dev, void *data) -{ - return dev == (struct device *)data; -} - static struct component_match *exynos_drm_match_add(struct device *dev) { struct component_match *match = NULL; @@ -234,8 +229,7 @@ static struct component_match *exynos_drm_match_add(struct device *dev) if (!(info->flags & DRM_FIMC_DEVICE) || exynos_drm_check_fimc_device(d) == 0) - component_match_add(dev, &match, - compare_dev, d); + component_match_add(dev, &match, component_compare_dev, d); p = d; } put_device(p); From patchwork Mon Feb 14 06:08:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744927 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 10554C433EF for ; Mon, 14 Feb 2022 06:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/UHMx3gw92CkhZhmaJCHW7pnQ6X4AdpBM6OVuERPuEQ=; b=Mwrl2zODUY/3RN H/0s9UFBpDLWKF5tHmQn3ovOFOSiwTPKLOfu9grmo8I8ZUGlK7gCYsz6OuSLWVHF1liAaXkzZjnKT gY0BHvycj4EE+0QXu9B4VaMkq146XN9/QkxbJpoftbs7e7oMOzT7N0s5xnI49ZrWIpzYN3NJYFnJO 7aRzqi9Xn58HNiVoXNOSf2EfpMckwM1Zz9zWg33QZ6YtnmkY3T+GgqEHb3NDMKIyt/G4uq3fwmlYw DCJmtrlsYGtzGZGNUV6XKzAz8C2wtGfLQWIguR12wkrG2o7qflkawFzJIIRz149XSo1k4prciULTM Q56ewfxHkgFyqoKMHVcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUbI-00DLaw-4R; Mon, 14 Feb 2022 06:12:40 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUaw-00DLPk-Uc; Mon, 14 Feb 2022 06:12:20 +0000 X-UUID: c91e5288e7c34b9283e10b621a90325e-20220213 X-UUID: c91e5288e7c34b9283e10b621a90325e-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1227138031; Sun, 13 Feb 2022 23:12:09 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:11:18 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:11:16 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:14 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Linus Walleij" Subject: [PATCH 15/23] drm/mcde: Make use of the helper component_compare_dev Date: Mon, 14 Feb 2022 14:08:11 +0800 Message-ID: <20220214060819.7334-16-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_221219_019116_561BC976 X-CRM114-Status: GOOD ( 12.68 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Linus Walleij Signed-off-by: Yong Wu --- drivers/gpu/drm/mcde/mcde_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index 5b5afc6aaf8e..a17bfbb152a2 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -265,11 +265,6 @@ static struct platform_driver *const mcde_component_drivers[] = { &mcde_dsi_driver, }; -static int mcde_compare_dev(struct device *dev, void *data) -{ - return dev == data; -} - static int mcde_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -399,7 +394,7 @@ static int mcde_probe(struct platform_device *pdev) while ((d = platform_find_device_by_driver(p, drv))) { put_device(p); - component_match_add(dev, &match, mcde_compare_dev, d); + component_match_add(dev, &match, component_compare_dev, d); p = d; } put_device(p); From patchwork Mon Feb 14 06:08:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744971 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 182FCC433F5 for ; Mon, 14 Feb 2022 06:21:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XfWxpipzYGUX+cTuG542tWrb6ABFbNTw4RhktuM3So4=; b=xIMfR4thmnTZ5C PJ1npEIkq8xcuoLXbXF1eOYphNkyIS5D89hVutHMe7ISi3GFsKCUrB+kW8/+HX+lXwlwz5ZBDk5zI 2XpvMSF30gaUKKe+UBVDcj6DXqR/EtWCHhvmH/2FnSV1ZnAZpptdLfw6SOEFVGCFemJpNGGuJ0vbW SS4Sw8jHp9rWnxBJ7+kX94pzpy0xDNLs/VofdbqRQK7Fzza/Uzk1qZiy+GC0ma4hSdVngK/I/sAqi Ba6qCnSSGUBmj77LLdJ+qqx5cbsE5le+cfQx4ArlWHGnXxrbmEkB5Eax9kWK4g46afu0TEgf/lj8T UjjEniHFpOl2jz7ergrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjE-00DOs3-81; Mon, 14 Feb 2022 06:20:52 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUid-00DOhM-NT; Mon, 14 Feb 2022 06:20:17 +0000 X-UUID: af24882016c04d809fe58374fd258d33-20220213 X-UUID: af24882016c04d809fe58374fd258d33-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1702435093; Sun, 13 Feb 2022 23:20:13 -0700 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:11:27 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Mon, 14 Feb 2022 14:11:25 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:23 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Tomi Valkeinen" , Cai Huoqing Subject: [PATCH 16/23] drm/omap: dss: Make use of the helper component_compare_dev Date: Mon, 14 Feb 2022 14:08:12 +0800 Message-ID: <20220214060819.7334-17-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222015_801867_68460956 X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Tomi Valkeinen Cc: Cai Huoqing Cc: Arnd Bergmann Cc: Laurent Pinchart Signed-off-by: Yong Wu --- drivers/gpu/drm/omapdrm/dss/dss.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c index 69b3e15b9356..0399f3390a0a 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -1344,12 +1344,6 @@ static const struct component_master_ops dss_component_ops = { .unbind = dss_unbind, }; -static int dss_component_compare(struct device *dev, void *data) -{ - struct device *child = data; - return dev == child; -} - struct dss_component_match_data { struct device *dev; struct component_match **match; @@ -1379,7 +1373,7 @@ static int dss_add_child_component(struct device *dev, void *data) return device_for_each_child(dev, cmatch, dss_add_child_component); - component_match_add(cmatch->dev, match, dss_component_compare, dev); + component_match_add(cmatch->dev, match, component_compare_dev, dev); return 0; } From patchwork Mon Feb 14 06:08:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744931 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C75E8C433EF for ; Mon, 14 Feb 2022 06:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZnWgyI0lTrWsgagUOQF2SVdQfCp8pkbGuGxtF9KSG0k=; b=1tsoD8KcVdwQf3 LkZ+4lov8fsC6+2f+1BDEcbVOWqT31a4rDpX63CD1AovImqWy467evpU/s+GRNzph5To1bBwiHWop kKRFBxYSk90cT7Vrq1zaquoCvjCEWM9HaFUiuoDuW1AP1kCzjbp0AimtBdMI/dotAn3ioVC23TkWH GSYZjqFpaevc0Jw1zfwAGXX6lot0Leo6Xuv8vRR2bml/mtEODj2ne3pb+NGyZkdgHRGSAaBh7M/N+ nkIkGdifyTptqDXhnFNLSyosmzvm9FZVr9QMCzXimvIj85+SJWACnVictwH4ZY1W0pYpoQ5HDJx6C Y5qL7gr7aRx6ZOUXiUUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUcI-00DMAG-MK; Mon, 14 Feb 2022 06:13:42 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUb0-00DLPk-3e; Mon, 14 Feb 2022 06:12:28 +0000 X-UUID: 8e3db72f908f431e96fed08bd07d7d55-20220213 X-UUID: 8e3db72f908f431e96fed08bd07d7d55-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1458077249; Sun, 13 Feb 2022 23:12:09 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:11:35 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:11:33 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:31 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Emma Anholt" , Maxime Ripard Subject: [PATCH 17/23] drm/vc4: Make use of the helper component_compare_dev Date: Mon, 14 Feb 2022 14:08:13 +0800 Message-ID: <20220214060819.7334-18-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_221222_204026_13092B64 X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Emma Anholt Cc: Maxime Ripard Signed-off-by: Yong Wu --- drivers/gpu/drm/vc4/vc4_drv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 16abc3a3d601..e0f4c2ef8ba6 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -187,11 +187,6 @@ static struct drm_driver vc4_drm_driver = { .patchlevel = DRIVER_PATCHLEVEL, }; -static int compare_dev(struct device *dev, void *data) -{ - return dev == data; -} - static void vc4_match_add_drivers(struct device *dev, struct component_match **match, struct platform_driver *const *drivers, @@ -205,7 +200,7 @@ static void vc4_match_add_drivers(struct device *dev, while ((d = platform_find_device_by_driver(p, drv))) { put_device(p); - component_match_add(dev, match, compare_dev, d); + component_match_add(dev, match, component_compare_dev, d); p = d; } put_device(p); From patchwork Mon Feb 14 06:08:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744977 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 36DEDC433EF for ; Mon, 14 Feb 2022 06:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MGyNeirnTq9+knXrkpEe3U26qgR3kMfh06y4vxrTtJI=; b=dydPQIv8r/r/bw g47EEroFAFkJR3ISyZOQTM+S25VcccTJh+zKkR8kAfAAWnoZGA1+CHAGQ/NDw5UXZ1UHMGseXdjNu 7WzIOQnISAb0hTVg6OpCmIRtfG6wuPXjB79LiFWcrm5GLXILuTH0RysjlVf86rpnwBbpwvlsqs+Hi KaGG9xmTUk/fxsbUOp8aSnQRYSsQoosQONnRUTMmei854m1hp4zUvak3iHq0LYDob5u0IX6rsBHfj tj5Kuz3nl4+YW/9ELl0A7wrUKy453Myb3/OzmQZKn7yaBz4S8h15Fd3HoOdfaBBAJz8JIg9/PwJJ3 6jUG6LZFpm96sKFjzveQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUlp-00DQJb-BJ; Mon, 14 Feb 2022 06:23:33 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUii-00DOhM-G0; Mon, 14 Feb 2022 06:20:22 +0000 X-UUID: d6e371a11b51471c9d09b895d9ed67b0-20220213 X-UUID: d6e371a11b51471c9d09b895d9ed67b0-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 848160423; Sun, 13 Feb 2022 23:20:13 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:11:42 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:11:41 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:39 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Maarten Lankhorst" , Maxime Ripard , Thomas Zimmermann Subject: [PATCH 18/23] drm: of: Make use of the helper component_release_of Date: Mon, 14 Feb 2022 14:08:14 +0800 Message-ID: <20220214060819.7334-19-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222020_577235_D702C6BF X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common release helper from component. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Signed-off-by: Yong Wu --- drivers/gpu/drm/drm_of.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 59d368ea006b..9a2cfab3a177 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -18,11 +18,6 @@ * properties. */ -static void drm_release_of(struct device *dev, void *data) -{ - of_node_put(data); -} - /** * drm_of_crtc_port_mask - find the mask of a registered CRTC by port OF node * @dev: DRM device @@ -94,7 +89,7 @@ void drm_of_component_match_add(struct device *master, struct device_node *node) { of_node_get(node); - component_match_add_release(master, matchptr, drm_release_of, + component_match_add_release(master, matchptr, component_release_of, compare, node); } EXPORT_SYMBOL_GPL(drm_of_component_match_add); From patchwork Mon Feb 14 06:08:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744989 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 86290C433EF for ; Mon, 14 Feb 2022 06:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vkQYH23p/KQN8uq6g670TziXZkelTAAZIfGLJBnQIAA=; b=v7MYpezUirMI8C GiJWX6WeuIg5kU9t89hxrHvOYGbHIhqVOY8AuOn/+YeT/JgQ6Cd/Urf8FQpqLVaHtsR9i3kUdHyWi UYdY0R3ddISszLpAmC/MYLJqHR+RcdIIxOYRusxyh9ysmg+xvy1Gd3MXj45s4bho5Jv3RsfUmXX8V 2g1/U1uxfxB3cUJwgVyZjlYrXBnNO3onlvt5HiA2WIZ36FfwG9yX7uWdqasIe4MF606oYWaUHuvQG ezndUQJw4F2Tl9XqVk76eUR5+VqSoFQR4zfBhdtXHzL5ILA5NvzsjsgRoKJ9EOE7gY14p0ZsZCjpt JpixHZtaVJHvbLC3+IUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUmO-00DQeg-Gt; Mon, 14 Feb 2022 06:24:08 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjG-00DOss-M4; Mon, 14 Feb 2022 06:20:56 +0000 X-UUID: f9d860a6156c45b5b4a5fef176bb288a-20220213 X-UUID: f9d860a6156c45b5b4a5fef176bb288a-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 206076781; Sun, 13 Feb 2022 23:20:53 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:11:51 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:11:49 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:47 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Yunfei Wang" , Libo Kang , Anan Sun , Mingyuan Ma , Xueqi Zhang Subject: [PATCH 19/23] iommu/mediatek: Make use of the helper component_compare/release_of Date: Mon, 14 Feb 2022 14:08:15 +0800 Message-ID: <20220214060819.7334-20-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222054_758769_A52E30E9 X-CRM114-Status: GOOD ( 14.73 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare/release helpers from component. Cc: Joerg Roedel Cc: Will Deacon Cc: Matthias Brugger Cc: Yunfei Wang Cc: Libo Kang Cc: Anan Sun Cc: Mingyuan Ma Cc: Xueqi Zhang Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c | 4 ++-- drivers/iommu/mtk_iommu.h | 10 ---------- drivers/iommu/mtk_iommu_v1.c | 4 ++-- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 25b834104790..a2ec9003826c 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -852,8 +852,8 @@ static int mtk_iommu_probe(struct platform_device *pdev) } data->larb_imu[id].dev = &plarbdev->dev; - component_match_add_release(dev, &match, release_of, - compare_of, larbnode); + component_match_add_release(dev, &match, component_release_of, + component_compare_of, larbnode); } /* Get smi-common dev from the last larb. */ diff --git a/drivers/iommu/mtk_iommu.h b/drivers/iommu/mtk_iommu.h index f81fa8862ed0..b742432220c5 100644 --- a/drivers/iommu/mtk_iommu.h +++ b/drivers/iommu/mtk_iommu.h @@ -84,16 +84,6 @@ struct mtk_iommu_data { struct mtk_smi_larb_iommu larb_imu[MTK_LARB_NR_MAX]; }; -static inline int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - -static inline void release_of(struct device *dev, void *data) -{ - of_node_put(data); -} - static inline int mtk_iommu_bind(struct device *dev) { struct mtk_iommu_data *data = dev_get_drvdata(dev); diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c index be22fcf988ce..83bd10617c9f 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c @@ -599,8 +599,8 @@ static int mtk_iommu_probe(struct platform_device *pdev) } data->larb_imu[i].dev = &plarbdev->dev; - component_match_add_release(dev, &match, release_of, - compare_of, larbnode); + component_match_add_release(dev, &match, component_release_of, + component_compare_of, larbnode); } platform_set_drvdata(pdev, data); From patchwork Mon Feb 14 06:08:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744991 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E9097C433F5 for ; Mon, 14 Feb 2022 06:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kzg998dFUdoFTy81mwk9+d4SDH22SFozXkL/G6WbRLA=; b=NtIdAT9ZZ/1gZU 7CUoxrwOEBkJqpwWXc5aL5+1JguiBufH0a8I0Q2KBnM1ljfpP2ebenKKB3ffvPuzGEHW/53U9EQkw TDZShG4uNLNNSRw+I83ZGK0NfbGSUG/Z5xrzhdex1DYJFmx+IdF4nSYY7iBvCkplzGpoAAUK75D5/ wwzXpA/meIUBJyzU5yciDr8qBLVwSZbTsqulgmwVxXIL4l9qzETLXOQUDEn5qW7TFkRDFh29uL+/H Ob8U4g9BVwEH6JsCiAtoOOZwnQZMMz+REGbZkt2z+GRABAhaQcKhnAZFMcvcvruVYgdfIrrtKR+pr AHZeLL5v9meMpTFgvT+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUnT-00DRGb-1M; Mon, 14 Feb 2022 06:25:15 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjJ-00DOss-Fc; Mon, 14 Feb 2022 06:20:59 +0000 X-UUID: 57c1c40e13204ac1b87de56777ba2baf-20220213 X-UUID: 57c1c40e13204ac1b87de56777ba2baf-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 415853990; Sun, 13 Feb 2022 23:20:53 -0700 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:12:02 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:12:00 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:11:58 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Liam Girdwood" , Mark Brown , "Jaroslav Kysela" , Takashi Iwai , Pierre-Louis Bossart , Subject: [PATCH 20/23] ASoC: codecs: wcd938x: Make use of the helper component_compare/release_of Date: Mon, 14 Feb 2022 14:08:16 +0800 Message-ID: <20220214060819.7334-21-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222057_547200_1135B90D X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare/release helpers from component. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Srinivas Kandagatla Cc: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org Signed-off-by: Yong Wu --- sound/soc/codecs/wcd938x.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index eff200a07d9f..54f4a41ceca2 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4417,16 +4417,6 @@ static const struct component_master_ops wcd938x_comp_ops = { .unbind = wcd938x_unbind, }; -static int wcd938x_compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - -static void wcd938x_release_of(struct device *dev, void *data) -{ - of_node_put(data); -} - static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, struct device *dev, struct component_match **matchptr) @@ -4442,8 +4432,8 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, } of_node_get(wcd938x->rxnode); - component_match_add_release(dev, matchptr, wcd938x_release_of, - wcd938x_compare_of, wcd938x->rxnode); + component_match_add_release(dev, matchptr, component_release_of, + component_compare_of, wcd938x->rxnode); wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); if (!wcd938x->txnode) { @@ -4451,8 +4441,8 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, return -ENODEV; } of_node_get(wcd938x->txnode); - component_match_add_release(dev, matchptr, wcd938x_release_of, - wcd938x_compare_of, wcd938x->txnode); + component_match_add_release(dev, matchptr, component_release_of, + component_compare_of, wcd938x->txnode); return 0; } From patchwork Mon Feb 14 06:08:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744990 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9838FC433F5 for ; Mon, 14 Feb 2022 06:24:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q6PQZGEpcleXjfhaYyoUWUMm0S07f7b6bztO6urwq3M=; b=WoqcH/SLTPj3iH naTI17hfBtwzfJh2Rc81wW/zHpY/NKlVgVkhis0iIDdqLMOrPI+4SXKlY2EALufNK1a6zDxaCAlvZ KvXEt3uT/UMxLrQnIFEWg6UAkX9tOIVWAi9jhN4z9/W+iL2gq0AIVi1keR04DgfQlRyamVotSZDHS luRKYZuCva+Nr/O1+XfKZRRVxf77fy035v4on4IvKwVOqSY1di3SG9BVcgeRLLqADgKyzTfe4Ew+C LoEC7i3gYxQWlQbHXPva835sRrlWskAP8P33heNVJJJNchVCVxr+g8lMIMCpqXNnkwSKQHIDlCFj8 z5BfagVRWPd+kCSROK4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUmQ-00DQg2-Vd; Mon, 14 Feb 2022 06:24:11 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjI-00DOss-39; Mon, 14 Feb 2022 06:20:57 +0000 X-UUID: e772c577d426400c9ee0e451d22da728-20220213 X-UUID: e772c577d426400c9ee0e451d22da728-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 665810143; Sun, 13 Feb 2022 23:20:53 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:12:10 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:12:09 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:12:07 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , Subject: [PATCH 21/23] power: supply: ab8500: Make use of the helper component_compare_dev Date: Mon, 14 Feb 2022 14:08:17 +0800 Message-ID: <20220214060819.7334-22-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222056_182377_F178F613 X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Sebastian Reichel Cc: linux-pm@vger.kernel.org Signed-off-by: Yong Wu --- drivers/power/supply/ab8500_charger.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c index ce074c018dcb..875fe665f8a8 100644 --- a/drivers/power/supply/ab8500_charger.c +++ b/drivers/power/supply/ab8500_charger.c @@ -3414,11 +3414,6 @@ static struct platform_driver *const ab8500_charger_component_drivers[] = { &ab8500_chargalg_driver, }; -static int ab8500_charger_compare_dev(struct device *dev, void *data) -{ - return dev == data; -} - static int ab8500_charger_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -3657,8 +3652,7 @@ static int ab8500_charger_probe(struct platform_device *pdev) while ((d = platform_find_device_by_driver(p, drv))) { put_device(p); - component_match_add(dev, &match, - ab8500_charger_compare_dev, d); + component_match_add(dev, &match, component_compare_dev, d); p = d; } put_device(p); From patchwork Mon Feb 14 06:08:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744929 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 726A4C433EF for ; Mon, 14 Feb 2022 06:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wFEROfo02R6e346SsW+MZ314Kg2RIuMnNSV6QeKDsO4=; b=P3+185m6pucXrh pEKGkN4oscxGD3MboHAw+5TaWMltHwLjH9gpkV7OlvHXLan2xrd8yRAyH5i7dE0ALM82x+lllhDLl t7Ta0r0G+32Cacm7EQs/4LTQIKuW3LsYMRoL/r3vIGEeOFy6nt1VIzp+geMA25JqXKqiGrkO13n5z AInAzYKwkboKOOsusKBD5XTdKs0uDcFYzKtfhR1Tb/ihNMeLS/EhYEEORVD+MP+QwFTxezwlUheBq Atx/Ghew2hy83BTspeCewY8yP/HAZMcoUGRgp18DT6e7OQTX6ny7F0HRIiypD/mAQZKamcCWjp6XW Dj8IACTvIsqv4muRyXpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUbt-00DLsR-PJ; Mon, 14 Feb 2022 06:13:17 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUay-00DLRH-Lx; Mon, 14 Feb 2022 06:12:22 +0000 X-UUID: f0723469fcc4470991672b07758f2758-20220213 X-UUID: f0723469fcc4470991672b07758f2758-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 99944418; Sun, 13 Feb 2022 23:12:19 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:12:17 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 14 Feb 2022 14:12:15 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:12:13 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Helge Deller" , , Subject: [PATCH 22/23] video: omapfb: dss: Make use of the helper component_compare_dev Date: Mon, 14 Feb 2022 14:08:18 +0800 Message-ID: <20220214060819.7334-23-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_221220_771962_DF9E2FF9 X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Helge Deller Cc: linux-omap@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Yong Wu --- drivers/video/fbdev/omap2/omapfb/dss/dss.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss.c b/drivers/video/fbdev/omap2/omapfb/dss/dss.c index a6b1c1598040..45b9d3cf3860 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dss.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss.c @@ -1193,12 +1193,6 @@ static const struct component_master_ops dss_component_ops = { .unbind = dss_unbind, }; -static int dss_component_compare(struct device *dev, void *data) -{ - struct device *child = data; - return dev == child; -} - static int dss_add_child_component(struct device *dev, void *data) { struct component_match **match = data; @@ -1212,7 +1206,7 @@ static int dss_add_child_component(struct device *dev, void *data) if (strstr(dev_name(dev), "rfbi")) return 0; - component_match_add(dev->parent, match, dss_component_compare, dev); + component_match_add(dev->parent, match, component_compare_dev, dev); return 0; } From patchwork Mon Feb 14 06:08:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Wu X-Patchwork-Id: 12744973 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DBB67C433EF for ; Mon, 14 Feb 2022 06:21:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8F91V+B1zrppQuru3l2OIdRhVp673Z1J630kVUK7GIk=; b=pnw+IjYrahoSSB jmXBorGL01Ta1fFNDveLRt3q4GuVdkgb8MzD2UzlB5WYcgCZ1GL3lK3nM8pL0xLp2jAHmotzRJ+Ji 4Ue07kqoKcDPS1Qky86IMTFrbEp6TQxUGu0j1cp3p3QjOYQTcqaob8bz3Vxdn9aFc6ucqZqvCiHhu BDUa4FYuBC0cYhuXDhd+Ja7/TyUfKpTu3+Pwep29x8MW54w7sdMfsPUT8BZ0BtWaVhW6amuVW44Vt ZuVL4PDZdK4mbbLp7ytHOrQBuALle/uFalugLkQgSzpCe+sQxQSbqKiKMKjUSQG0mygw5qmid/Ups X5cQiXxrkFBBGvlmjVcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUjf-00DP4J-16; Mon, 14 Feb 2022 06:21:19 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJUif-00DOhM-DT; Mon, 14 Feb 2022 06:20:18 +0000 X-UUID: 168115e6d45d4e5498d856e3c51dfff7-20220213 X-UUID: 168115e6d45d4e5498d856e3c51dfff7-20220213 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 801895153; Sun, 13 Feb 2022 23:20:13 -0700 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 13 Feb 2022 22:12:24 -0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 14 Feb 2022 14:12:22 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 14 Feb 2022 14:12:20 +0800 From: Yong Wu To: Greg Kroah-Hartman , David Airlie , Daniel Vetter , CC: James Wang , Liviu Dudau , , Matthias Brugger , Krzysztof Kozlowski , , "Joerg Roedel" , Will Deacon , Arnd Bergmann , Laurent Pinchart , , Chun-Kuang Hu , , "Stephen Boyd" , AngeloGioacchino Del Regno , Hsin-Yi Wang , Robin Murphy , Tomasz Figa , , Rob Clark , Srinivas Kandagatla , Sebastian Reichel , Yong Wu , "Jaroslav Kysela" , Takashi Iwai , Jeremy Szu , Werner Sembach , "Hui Wang" , Cameron Berkenpas , "Kailang Yang" , Lucas Tanure , Sami Loone , Subject: [PATCH 23/23] ALSA: hda/realtek: Make use of the helper component_compare_dev_name Date: Mon, 14 Feb 2022 14:08:19 +0800 Message-ID: <20220214060819.7334-24-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220214060819.7334-1-yong.wu@mediatek.com> References: <20220214060819.7334-1-yong.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222017_485294_49BD490A X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use the common compare helper from component. Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Jeremy Szu Cc: Werner Sembach Cc: Hui Wang Cc: Cameron Berkenpas Cc: Kailang Yang Cc: Lucas Tanure Cc: Sami Loone Cc: alsa-devel@alsa-project.org Signed-off-by: Yong Wu --- sound/pci/hda/patch_realtek.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 668274e52674..9da004d99cdb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6530,11 +6530,6 @@ static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec, } } -static int comp_match_dev_name(struct device *dev, void *data) -{ - return strcmp(dev_name(dev), data) == 0; -} - static int find_comp_by_dev_name(struct alc_spec *spec, const char *name) { int i; @@ -6595,7 +6590,7 @@ static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char "%s-%s:00-cs35l41-hda.%d", bus, hid, i); if (!name) return; - component_match_add(dev, &spec->match, comp_match_dev_name, name); + component_match_add(dev, &spec->match, component_compare_dev_name, name); } ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); if (ret) @@ -6644,9 +6639,9 @@ static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const st switch (action) { case HDA_FIXUP_ACT_PRE_PROBE: - component_match_add(dev, &spec->match, comp_match_dev_name, + component_match_add(dev, &spec->match, component_compare_dev_name, "i2c-CLSA0100:00-cs35l41-hda.0"); - component_match_add(dev, &spec->match, comp_match_dev_name, + component_match_add(dev, &spec->match, component_compare_dev_name, "i2c-CLSA0100:00-cs35l41-hda.1"); ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); if (ret)