Message ID | 20230214134127.59273-10-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2978813wrn; Tue, 14 Feb 2023 05:43:48 -0800 (PST) X-Google-Smtp-Source: AK7set8a/03zh7HNncKWH8JX577Lm1ayaQ7LRtNVBbbKo/mKB81Lv8Sux1CQcDxHJ3rDlmjBS/2j X-Received: by 2002:a17:906:7621:b0:87a:ee05:f7b with SMTP id c1-20020a170906762100b0087aee050f7bmr2713100ejn.24.1676382228303; Tue, 14 Feb 2023 05:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676382228; cv=none; d=google.com; s=arc-20160816; b=cBEwbeqexIY96XIgCYzEHbNXNngZTPknyWlIvVIg9/ZkUBW0Yb6E/kuNtROCFRrkk7 EG2W/iMDc7n355n1lTI4VH0rXHNqCnJxFn7TK6Rn6TuAhAT+lgzGJ3oOmbU4lnBFAoSr WbQCDX3tjxTXatg+8L/BaRABvqI5R6acWSu/aCLdwgog32x73TOKEa4Jk3kGGKtHzdwW 3xgCaW8gkKabX7aNQz3ZgJTh9HDGTwINddejpgRXrPiBZLEiDG4/VzJxJ7dhWD0/4CF2 5/epovHLRKtLllesv3aSh9iwCCeoJ/Z4PmYLWIF+jD/0Cw4MFNF2JtRIUpU9sjqYhswL NACQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/CD+kPKLKtNcRNhg9h3q91MUlSRhWBnEZhoyFlpWT+w=; b=H3wkt7m3kN0fxDuXE+4z9YZXkCHt4fcrOBsX3ljNJaipDr4SBkCt//SXJj0+WqgYM+ 0p9TPfIr25FRg+qy9YAnbeXCp50BVFonc2QrwGjHCy8uSYoB1FFpLkazKJukHaHhFhY5 CRd9r9IlcMktXWf/RH74NOxzxr2j85XE2ukENnA26FGqR8Ve82VZjHiKmyfT6GCdEAFZ 4tzJ8s6zxXUuXKorULiBB2giGZRsLwv79pbAJ7okHrVrGQAWWlHNMZfCXE0BYOlJsOL8 1Evmp0FyTH7H8FaBC0Iw1DdiEMDmRHSl8bj7ls4xwFlZB30izPeYk2vJKHbAU1RkEp56 p+Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YEPSULvF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a170907915200b00886221b44e7si16672966ejs.796.2023.02.14.05.43.24; Tue, 14 Feb 2023 05:43:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YEPSULvF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230119AbjBNNm3 (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 14 Feb 2023 08:42:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232477AbjBNNmR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Feb 2023 08:42:17 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5648D27496; Tue, 14 Feb 2023 05:41:55 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id EC071660214A; Tue, 14 Feb 2023 13:41:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676382114; bh=WEEZtBIZpKNptv8tSktYg4UhYPhXl/C/NojcYqNntF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YEPSULvF99qLzTnln3NPeckhyLrl+82f5fpWdVjjq2ArYJzVYY6FnOxpT9MQO5dJf CYmTG/1lp4YO9WHq6tz+zCnpCwUR6UuON/DTILNX43hTUVwqIrZu50lsgaZLVbLq2D G62O/aoufsvrTLepZeTUxKqCIDJ0JQPF5ssdccEKxMYrY22gJ7sIW+RRH2VCe9RCMg 8h7n7yDXwnIwsu552x5JZolzU8AWqXeYJ4TbB532nWV666iAAT+NqB6ioB/8WQ0kjr dODp+PFfLu3c/kuQGYF9rAObZPsuWIsxkr/XRbN8aCxo/uRdXFWbaXX/aHZPL/oxpq ZhWmofRTO/aXg== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: mturquette@baylibre.com Cc: sboyd@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, wenst@chromium.org, johnson.wang@mediatek.com, miles.chen@mediatek.com, chun-jie.chen@mediatek.com, daniel@makrotopia.org, fparent@baylibre.com, msp@baylibre.com, nfraprado@collabora.com, rex-bc.chen@mediatek.com, zhaojh329@gmail.com, sam.shih@mediatek.com, edward-jw.yang@mediatek.com, yangyingliang@huawei.com, granquet@baylibre.com, pablo.sun@mediatek.com, sean.wang@mediatek.com, chen.zhong@mediatek.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com Subject: [PATCH v2 09/47] clk: mediatek: mt2712: Change to use module_platform_driver macro Date: Tue, 14 Feb 2023 14:40:49 +0100 Message-Id: <20230214134127.59273-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230214134127.59273-1-angelogioacchino.delregno@collabora.com> References: <20230214134127.59273-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757814171340678766?= X-GMAIL-MSGID: =?utf-8?q?1757814171340678766?= |
Series |
MediaTek clocks: full module build and cleanups
|
|
Commit Message
AngeloGioacchino Del Regno
Feb. 14, 2023, 1:40 p.m. UTC
Now that all of the clocks in clk-mt2712.c are using the common
mtk_clk_simple_{probe,remove}() callbacks we can safely migrate
to module_platform_driver.
While at it, also drop all references to `simple` in the specific
context of mt2712 as that was used in the past only to allow us
to have two platform_driver(s) in one file.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/clk/mediatek/clk-mt2712.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
Comments
On Tue, Feb 14, 2023 at 9:41 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > Now that all of the clocks in clk-mt2712.c are using the common > mtk_clk_simple_{probe,remove}() callbacks we can safely migrate > to module_platform_driver. > While at it, also drop all references to `simple` in the specific > context of mt2712 as that was used in the past only to allow us > to have two platform_driver(s) in one file. > > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c index c5fd76d1b9df..937c370d6765 100644 --- a/drivers/clk/mediatek/clk-mt2712.c +++ b/drivers/clk/mediatek/clk-mt2712.c @@ -1020,7 +1020,7 @@ static const struct mtk_clk_desc peri_desc = { .rst_desc = &clk_rst_desc[1], }; -static const struct of_device_id of_match_clk_mt2712_simple[] = { +static const struct of_device_id of_match_clk_mt2712[] = { { .compatible = "mediatek,mt2712-infracfg", .data = &infra_desc }, { .compatible = "mediatek,mt2712-mcucfg", .data = &mcu_desc }, { .compatible = "mediatek,mt2712-pericfg", .data = &peri_desc, }, @@ -1028,18 +1028,12 @@ static const struct of_device_id of_match_clk_mt2712_simple[] = { { /* sentinel */ } }; -static struct platform_driver clk_mt2712_simple_drv = { +static struct platform_driver clk_mt2712_drv = { .probe = mtk_clk_simple_probe, .remove = mtk_clk_simple_remove, .driver = { - .name = "clk-mt2712-simple", - .of_match_table = of_match_clk_mt2712_simple, + .name = "clk-mt2712", + .of_match_table = of_match_clk_mt2712, }, }; - -static int __init clk_mt2712_init(void) -{ - return platform_driver_register(&clk_mt2712_simple_drv); -} - -arch_initcall(clk_mt2712_init); +module_platform_driver(clk_mt2712_drv);