From nobody Thu Nov 14 07:09:32 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 45278C6FD1C for ; Mon, 6 Mar 2023 14:07:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbjCFOHl (ORCPT ); Mon, 6 Mar 2023 09:07:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbjCFOHR (ORCPT ); Mon, 6 Mar 2023 09:07:17 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0E2630B02; Mon, 6 Mar 2023 06:06:50 -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 50DC16602F6A; Mon, 6 Mar 2023 14:06:01 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678111562; bh=c06sztOuI8DQ5DDjj8gCYxk1bqozhA9LrG1lTO5UoY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hRRik9yhPavOoET28fPMy3EQmRsCtZmw2t4i7xc1ws4b9JPXUQfzBmiTd4pPevYNj FIzRdLTLjPG1qUCchXNy9pwpbpNzpNisDDHUkbpRsPg6cjQi06gmcFiC1cWhaTtqU5 YUBB5l675xjYbCRUQtv3qLp7eDXzAYS/1pp9k2Bptg/HcxW8fAXBUgSV6qmXAACSyj GRiINnS3AhoQxC5zZ7LaRM5O6xNpSQK7V7Hdf9gben6Gb6pt9bo+ypY/93b7q696ly WLDImDWGk9GhKdl9WEFGgGkWrHeHk1cKXhtkHvDb774yhyVMdNhbXi79vIpcgLjVmU HJKfdUMXfHIYw== 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, kernel@collabora.com Subject: [PATCH v6 09/54] clk: mediatek: mt2712-apmixedsys: Add .remove() callback for module build Date: Mon, 6 Mar 2023 15:04:58 +0100 Message-Id: <20230306140543.1813621-10-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306140543.1813621-1-angelogioacchino.delregno@collabora.com> References: <20230306140543.1813621-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" Add a .remove() callback to the apmixedsys driver to allow full module build; while at it, also change the usage of builtin_platform_driver() to module_platform_driver() to actually make use of the new callback. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai --- drivers/clk/mediatek/clk-mt2712-apmixedsys.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mt2712-apmixedsys.c b/drivers/clk/med= iatek/clk-mt2712-apmixedsys.c index 1e1a8272a4ac..2f4061c9a59e 100644 --- a/drivers/clk/mediatek/clk-mt2712-apmixedsys.c +++ b/drivers/clk/mediatek/clk-mt2712-apmixedsys.c @@ -138,6 +138,18 @@ static int clk_mt2712_apmixed_probe(struct platform_de= vice *pdev) return r; } =20 +static int clk_mt2712_apmixed_remove(struct platform_device *pdev) +{ + struct device_node *node =3D pdev->dev.of_node; + struct clk_hw_onecell_data *clk_data =3D platform_get_drvdata(pdev); + + of_clk_del_provider(node); + mtk_clk_unregister_plls(plls, ARRAY_SIZE(plls), clk_data); + mtk_free_clk_data(clk_data); + + return 0; +} + static const struct of_device_id of_match_clk_mt2712_apmixed[] =3D { { .compatible =3D "mediatek,mt2712-apmixedsys" }, { /* sentinel */ } @@ -145,9 +157,10 @@ static const struct of_device_id of_match_clk_mt2712_a= pmixed[] =3D { =20 static struct platform_driver clk_mt2712_apmixed_drv =3D { .probe =3D clk_mt2712_apmixed_probe, + .remove =3D clk_mt2712_apmixed_remove, .driver =3D { .name =3D "clk-mt2712-apmixed", .of_match_table =3D of_match_clk_mt2712_apmixed, }, }; -builtin_platform_driver(clk_mt2712_apmixed_drv) +module_platform_driver(clk_mt2712_apmixed_drv) --=20 2.39.2