From patchwork Mon Feb 20 15:00:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 59484 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1354165wrn; Mon, 20 Feb 2023 07:03:59 -0800 (PST) X-Google-Smtp-Source: AK7set9JEhQKE0vjYE8ANLTPX4WbEG+Zj+S2hI0qog7JCxSZC0TL+3fQCbzwBgiFO5/a95VWSX5P X-Received: by 2002:a62:4e4a:0:b0:5a8:ecb1:bfe with SMTP id c71-20020a624e4a000000b005a8ecb10bfemr1248651pfb.2.1676905439346; Mon, 20 Feb 2023 07:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676905439; cv=none; d=google.com; s=arc-20160816; b=wOpGvkDWKSAMQCFGTjj7zKLkSnd7TDHTGFulmGJx9t27gL9oIvX+deKM9zQeuSG8GX chKtqddtI7/TTvZswM3rsa7fk1lrgUL4BB7ZD7waK3vjS8qfBWYaKlphaN+HUCPl6pwm 8PjQ/zGrai/AkCqj6Hs0iHxIdjoCsMvMC6hK8nwdaBnL9kjvzBbTDy0e2ubAETge6PgC N0jv4WiDf+COHhQcstp8ET3zQCEVMAs/ROtivckomEoyAEdjYZtCn8xkzGMyBvaHrjmG T1WUMz/6EYTnzqRP9YUNaAjFAeXj1LVgZW+nnhbe1j3HLXodgfECU6CLKf70VqPbLezk 0OqA== 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=FCHbid1ecGDCGEXBltzdI6M1fmgwciOel2p07kKVbRg=; b=tsnPLFpcz8ByLRwuAbKh4FBrwDC6ucaJjvq4/2/7BQUfwiUxWBgc6ds5oRfBuvRTXT exS85ddgAIQkRDLkeJd3+T2l9PeLP/dXX76JBS7dB1WV3z6DpsnNl/HGeDLEprOWc+4c jh38N9xac1xuY2x7gx8b7UzBSSXoZ1FTuCXHqBY4ZYWoVdenpxu5hLt+GIV2R+PC4zdU Ccrat/KRr1hKUA8sslxzBprz6+0bAaSjjeJz7BiXYbArwU/JMNjqerl2VT9XlWM9BCLG 6VMN9r6Vne0JRsl2A+cESxSOa5AMSKjfMUpccI4BTTYmh34l0UHXiQV5hPD2XeWd/cA/ rffw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="fF77HQ/0"; 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 a3-20020aa794a3000000b005a8168a456bsi2503188pfl.286.2023.02.20.07.03.42; Mon, 20 Feb 2023 07:03:59 -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="fF77HQ/0"; 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 S232450AbjBTPCR (ORCPT + 99 others); Mon, 20 Feb 2023 10:02:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232199AbjBTPCF (ORCPT ); Mon, 20 Feb 2023 10:02:05 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78EB51F90A; Mon, 20 Feb 2023 07:01:31 -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 215EB6602179; Mon, 20 Feb 2023 15:01:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676905290; bh=Jd0WSEgoMoiyLJ/JPwWzI6i2w8ARgz466SU1nHCnAdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fF77HQ/0wexUKQO+Um9twd15V+8MkmbBJYlqBgT2eA21g72cgtze+YLA7i7+7hbMv fKRgjKF3MeYOO0IUClCLuqYLf4/sBpwJ5jltaJUC2qkQbM25BzIdLyWwiLn6K03bwy imlEpx+Hh48IPsoXLmXlfSdZyg86WocMcwCP1wrfQj8j4pjZUHl0PEWqToVsu6DZHi ROflXO8TTNpQGZekRJIn1x64mc9UiQ6Hal4ipYAgbWQKLKoKPqnO8Ch+Cc/mBle3lQ ymZPrI8xtjJSOX+wz9hpK7owTuCHxLoj/uPKpsDE35xwNTHz5sYgX9LWrTWxNRQ1fm HuwpSFioQ1vZQ== From: AngeloGioacchino Del Regno 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 Subject: [PATCH v3 10/55] clk: mediatek: mt2712: Change to use module_platform_driver macro Date: Mon, 20 Feb 2023 16:00:26 +0100 Message-Id: <20230220150111.77897-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220150111.77897-1-angelogioacchino.delregno@collabora.com> References: <20230220150111.77897-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758362797898567165?= X-GMAIL-MSGID: =?utf-8?q?1758362797898567165?= 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 Reviewed-by: Chen-Yu Tsai --- drivers/clk/mediatek/clk-mt2712.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) 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);