From patchwork Tue Nov 6 18:36:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10671303 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 D9D021751 for ; Tue, 6 Nov 2018 18:51:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE8192B04D for ; Tue, 6 Nov 2018 18:51:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC10E2B043; Tue, 6 Nov 2018 18:51:08 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable 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 597F32B049 for ; Tue, 6 Nov 2018 18:51:08 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=XnBaTOBXO4HH0jQUJF/+iDHyvQDVIa6X8Z/ncHwa/ZY=; b=TYKMUiaeaYFoKi uLMMK9AS2tJdqgOydjyIMbIqw4StJW4rKLr6UjEsMY2n5lD1zzrQs+H8BY8GZwy8EBOHzv7ZPWSSU sAjmmOzOgXMR8ha/LodYDGP4+tNt+2BlgInNsaWC0eEov8252gRWFkmErBGcAHLNs2djuvtN5MZwo OJZWzoXrlQBkBV1HV/vU90V26QKusOocTYudwI5MgX9ks3am3I7Lb9dYzgm6z6OgQfukhxWRiKlOm ZK1pJcEpom/pohR6gTZGQIYYEAstjfYV8xvyMwfjrSiVnwQeWn7KC9yg1uL4MxAGHS9snVSCvl5Ra KQ8GhGF1BJVD3ygJH9sA==; 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 1gK6RP-000074-C8; Tue, 06 Nov 2018 18:51:07 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK6DF-0002K7-Gb; Tue, 06 Nov 2018 18:36:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=o9i7YTQeQ/Ty3eC0kZoUVh8ZBa6WC87sYjlbRiqFK+A=; b=WDg29IO8e6XVgbqIXwL8WTYJ8l sFQ2JJd56MyN2nc7qB5kUPWXFSVDkhQx7d/3P9HdQXXwAJM0b+d5QX88ELL5+97BHb6mxQnauQefE /3Jr35YuNZy6WNrOSG82qkyMUpFHJ1eVHlrbhszQjNGGJpQbR5i7L1VK/jlkJNfi40vyIuYjjb5Vc eswdn9ODjLiSnyOWuxvNenT3cPsUUIZ010e/QkUVJ6O1MKDZxqjbI28e/QFmHRZ3nuoL6sug+kaeQ JvYJtcz2LEc2JbQLM2B1bzlHuXYpllCWEiatcybCeHncK9P9EHryWMzy/6EyhKQqunFhHzep4Pomn LayT/YOw==; Received: from mail.kernel.org ([198.145.29.99]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK6D9-0000HT-Vv; Tue, 06 Nov 2018 18:36:28 +0000 Received: from mail.kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3163E20881; Tue, 6 Nov 2018 18:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541529372; bh=+9J3ejrJhvN91DXb6pD9tMuM96sMeF+VM5wZyYshQfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WG/v+jSLtJ+9GQpzRJpzep9xSa1/GXoI2fqtDYW7DfBbWX42OJcuUBxKtkPUuhiJP yeTyYcwEPKkaQLPn0pUC2k75DB18lJGb7yE53a6Z9PnCqjgoPf1hQtGrSD+BA1Pj0h kNB7mODeHn+C/iC4OOgGnhIjV6IHuPg+hTEtNXiU= From: Stephen Boyd To: Michael Turquette , Stephen Boyd Subject: [PATCH 4/4] clk: mediatek: Simplify single driver probes Date: Tue, 6 Nov 2018 10:36:09 -0800 Message-Id: <20181106183609.207702-5-sboyd@kernel.org> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog In-Reply-To: <20181106183609.207702-1-sboyd@kernel.org> References: <20181106183609.207702-1-sboyd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181106_183624_411978_183BF2A1 X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ryder Lee , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We don't need to do the multiplex probe design here when we only have one compatible string. Just setup probe to point at the one probe function for now. Cc: Ryder Lee Signed-off-by: Stephen Boyd --- drivers/clk/mediatek/clk-mt2701-g3d.c | 28 +++------------------------ drivers/clk/mediatek/clk-mt7622-aud.c | 28 +++------------------------ 2 files changed, 6 insertions(+), 50 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt2701-g3d.c b/drivers/clk/mediatek/clk-mt2701-g3d.c index 1328c112a38f..58b13f12051a 100644 --- a/drivers/clk/mediatek/clk-mt2701-g3d.c +++ b/drivers/clk/mediatek/clk-mt2701-g3d.c @@ -58,34 +58,12 @@ static int clk_mt2701_g3dsys_init(struct platform_device *pdev) } static const struct of_device_id of_match_clk_mt2701_g3d[] = { - { - .compatible = "mediatek,mt2701-g3dsys", - .data = clk_mt2701_g3dsys_init, - }, { - /* sentinel */ - } + { .compatible = "mediatek,mt2701-g3dsys", }, + { /* sentinel */ } }; -static int clk_mt2701_g3d_probe(struct platform_device *pdev) -{ - int (*clk_init)(struct platform_device *); - int r; - - clk_init = of_device_get_match_data(&pdev->dev); - if (!clk_init) - return -EINVAL; - - r = clk_init(pdev); - if (r) - dev_err(&pdev->dev, - "could not register clock provider: %s: %d\n", - pdev->name, r); - - return r; -} - static struct platform_driver clk_mt2701_g3d_drv = { - .probe = clk_mt2701_g3d_probe, + .probe = clk_mt2701_g3dsys_init, .driver = { .name = "clk-mt2701-g3d", .of_match_table = of_match_clk_mt2701_g3d, diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c index 4f3d47b41b3e..2b10d13a8a37 100644 --- a/drivers/clk/mediatek/clk-mt7622-aud.c +++ b/drivers/clk/mediatek/clk-mt7622-aud.c @@ -171,34 +171,12 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev) } static const struct of_device_id of_match_clk_mt7622_aud[] = { - { - .compatible = "mediatek,mt7622-audsys", - .data = clk_mt7622_audiosys_init, - }, { - /* sentinel */ - } + { .compatible = "mediatek,mt7622-audsys", }, + { /* sentinel */ } }; -static int clk_mt7622_aud_probe(struct platform_device *pdev) -{ - int (*clk_init)(struct platform_device *); - int r; - - clk_init = of_device_get_match_data(&pdev->dev); - if (!clk_init) - return -EINVAL; - - r = clk_init(pdev); - if (r) - dev_err(&pdev->dev, - "could not register clock provider: %s: %d\n", - pdev->name, r); - - return r; -} - static struct platform_driver clk_mt7622_aud_drv = { - .probe = clk_mt7622_aud_probe, + .probe = clk_mt7622_audiosys_init, .driver = { .name = "clk-mt7622-aud", .of_match_table = of_match_clk_mt7622_aud,