From patchwork Wed Feb 22 09:24:59 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: 60391 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp473062wrd; Wed, 22 Feb 2023 01:27:48 -0800 (PST) X-Google-Smtp-Source: AK7set/x/+rWKNAKdwOc6jStApzsMf0kVkkzsEEPibVvt5ZoPyRIsBevFpRCW8uG8u6EqgpWiP4Y X-Received: by 2002:a17:902:ce01:b0:19a:723b:433e with SMTP id k1-20020a170902ce0100b0019a723b433emr7274892plg.42.1677058067982; Wed, 22 Feb 2023 01:27:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677058067; cv=none; d=google.com; s=arc-20160816; b=TBumvqdffdPPGECSvlR5axAu6NjoHUzlEmSy6jfA7mBDGEoQ7QNBEjdUF0C7J5o93F SQDfs/9B5v+Ncy37JdlRkZfcA+yqplKX2EazSepo7c49TWW2g1pREYAbAY4zya/Vak2X wzlcYoDTn1UZhkLmMYLehqoehGmxO2k4S6wBaa7iZ0yTKVfF4kclA5RshO9tTjUkEuo0 9dZc1gbG9pCrAtY/t/L7yRtKnLcaqiCRoPRl5mU8JdUOHQYfgwi8yVXVwAwr4jJIUbBb 5lfWQlO7oBXA9zx6lmkRorTKN/PH69UoImLLXlC6ZQf0XU2GX4LvLUMPv89w1v8rUY2V YZjg== 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=+F9muR85DBjtC5voFuGRCL9N4IZZIo/p0YS5CZYPE2c=; b=XELmZcyw77nuuRrInnJB4lusBqzPkI/pTGFdbQIE7MkGDdTp8izwiSYfcD2K9SFxPE WZvKxO948GUfSpERdGz/vlts1PqaF+WC6HwBfA2B/Idk+HGV7CeHxU/T9Rzduh41KHE2 Z5/RTMsYX/eMF3252vDo956OZ7tgSGtxdy9NEzrcbVk/qPiNLEClXd6vWRN2Y9TJdej9 d09Nlfyu82aQlaeetGHt3JxvVFQhHFKSYPq3cpXkW9sUdnBIbXxnoNsYYG444bPXbzym GidpeAmQ3VC0xwpzGi/3chPy67zEv3tq+u7n6KcSkWsEoNYmQs5Z9eCPTX8ynRWOcrWb 9CBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LgTDBwyN; 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-20020a170903121200b0019ca0bb87b7si3138065plh.51.2023.02.22.01.27.34; Wed, 22 Feb 2023 01:27:47 -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=LgTDBwyN; 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 S229935AbjBVJ0p (ORCPT + 99 others); Wed, 22 Feb 2023 04:26:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231712AbjBVJ0M (ORCPT ); Wed, 22 Feb 2023 04:26:12 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 045DD37568; Wed, 22 Feb 2023 01:26:10 -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 6012A66021D4; Wed, 22 Feb 2023 09:26:08 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677057969; bh=NtmeE+eeh8ruhnGAQGPiV2EGNcavUpCXpCbwzrlNZiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LgTDBwyNT7/IrMndAnJVdhiepkF+PG6jaOYSBcuImKv9l4ZlKZKV4Q6yWe62Iys/N bHQMbQ2rhXcIrpvS1R/y2HPrc37MLpO1E1yh/BUJvYfI6GoVN+3IPREMwpt9FGjpvj 4DwMaEPfcjEo7ZMIzdZ3GzqF8mWS8EO+anrsUBZab7zJwKF2M1p3TuqFvFlJJfUC3G ksFt4aIC5LClXSejDeNRjHx7V0VYfJ26R294Ci8P0YQeZDWy7LGFXcAqv2G5Z2EMOY DhYRRdSzi1M/k1kIDUSbDcMLWxfSx/j/fEBn91MH22qMZf362WdIQPkx5wxehLpYpp 3ErQ9XztyyFSA== 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 v5 10/54] clk: mediatek: mt2712: Change to use module_platform_driver macro Date: Wed, 22 Feb 2023 10:24:59 +0100 Message-Id: <20230222092543.19187-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230222092543.19187-1-angelogioacchino.delregno@collabora.com> References: <20230222092543.19187-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?1758522840211522619?= X-GMAIL-MSGID: =?utf-8?q?1758522840211522619?= 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);