From patchwork Mon Jun 3 15:49:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 10973095 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BE5F15E6 for ; Mon, 3 Jun 2019 15:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AA4D28399 for ; Mon, 3 Jun 2019 15:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EBD3286FE; Mon, 3 Jun 2019 15:51:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BD07528399 for ; Mon, 3 Jun 2019 15:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=dgohAdD466R5hg+dZNGYHRGRLRgdD1DuMAauWUnsaqI=; b=HZruMftZn1T4B0nicQBPU2r0b+ L+8aZoUW6w3XY4NaYifzlSCqA9f72LYdvwazGY+C9uxmrTCKeM/cWzuQhpchUoHL86F7mZ/Eqr8JW G8TDFeNUMkLchtWjnoMj59WmZ8WjnhbIsRAUto6cHNV5KTWse352M7Gi2aNriql8l4BVOCGwepI4A 38N/LO35cQkBTTrCWkyztQrlLNQP7m45AXpseYvpMGQTwaBRuELWunMT7nUaPQ/reUG3tuo+Yun7K g39S6uZeQ3CnIVnVCdpxw56jAsEX3G5VM/ezfrSOoQ5FRO/0bzVUScpRbJJPUyjzURBEw6RFl8V0j SjDZx/uA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXpEx-0006bD-0r; Mon, 03 Jun 2019 15:51:15 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXpEu-0006ar-TP for linux-rockchip@lists.infradead.org; Mon, 03 Jun 2019 15:51:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 823DD15AB; Mon, 3 Jun 2019 08:51:12 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CEC803F246; Mon, 3 Jun 2019 08:51:10 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Subject: [RFC PATCH 09/57] drivers: sound: rockchip: rk3399: Use bus_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:49:35 +0100 Message-Id: <1559577023-558-10-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190603_085112_954702_B92E670E X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , suzuki.poulose@arm.com, gregkh@linuxfoundation.org, rafael@kernel.org, Takashi Iwai , Liam Girdwood , linux-rockchip@lists.infradead.org, Mark Brown MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Switch to using the bus_find_device_by_of_node helper Cc: Heiko Stuebner Cc: Takashi Iwai Cc: Mark Brown Cc: Liam Girdwood Cc: linux-rockchip@lists.infradead.org Signed-off-by: Suzuki K Poulose Acked-by: Mark Brown --- sound/soc/rockchip/rk3399_gru_sound.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index 3d0cc6e..677c92c 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -405,11 +405,6 @@ static const struct dailink_match_data dailink_match[] = { }, }; -static int of_dev_node_match(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int rockchip_sound_codec_node_match(struct device_node *np_codec) { struct device *dev; @@ -421,8 +416,8 @@ static int rockchip_sound_codec_node_match(struct device_node *np_codec) continue; if (dailink_match[i].bus_type) { - dev = bus_find_device(dailink_match[i].bus_type, NULL, - np_codec, of_dev_node_match); + dev = bus_find_device_by_of_node(dailink_match[i].bus_type, + NULL, np_codec); if (!dev) continue; put_device(dev);