From nobody Thu Nov 14 07:17:35 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A53D4C64EC4 for ; Mon, 20 Feb 2023 15:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231313AbjBTPCS (ORCPT ); Mon, 20 Feb 2023 10:02:18 -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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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-m= t2712.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 =3D { .rst_desc =3D &clk_rst_desc[1], }; =20 -static const struct of_device_id of_match_clk_mt2712_simple[] =3D { +static const struct of_device_id of_match_clk_mt2712[] =3D { { .compatible =3D "mediatek,mt2712-infracfg", .data =3D &infra_desc }, { .compatible =3D "mediatek,mt2712-mcucfg", .data =3D &mcu_desc }, { .compatible =3D "mediatek,mt2712-pericfg", .data =3D &peri_desc, }, @@ -1028,18 +1028,12 @@ static const struct of_device_id of_match_clk_mt271= 2_simple[] =3D { { /* sentinel */ } }; =20 -static struct platform_driver clk_mt2712_simple_drv =3D { +static struct platform_driver clk_mt2712_drv =3D { .probe =3D mtk_clk_simple_probe, .remove =3D mtk_clk_simple_remove, .driver =3D { - .name =3D "clk-mt2712-simple", - .of_match_table =3D of_match_clk_mt2712_simple, + .name =3D "clk-mt2712", + .of_match_table =3D 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); --=20 2.39.1