Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2193132iof; Tue, 7 Jun 2022 22:46:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxms69m7MQUTFrk9nLfZX8W2HxiRvAmOyGZk1ElBgs/uqHNIbJOj10ddFLAP4eJGCq7wDc2 X-Received: by 2002:a17:903:1103:b0:167:839e:7ba1 with SMTP id n3-20020a170903110300b00167839e7ba1mr11916499plh.136.1654667188422; Tue, 07 Jun 2022 22:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667188; cv=none; d=google.com; s=arc-20160816; b=0uX8N68YnacuSqGp9jaJ8ysCYpxR9uLGFc0Y1aNDvujj7z1kTg9f/uzhPzqT1jC4Lz ygXTHJjx9OqdE9p4OCXNXtNRQPLSuWElEEdBrCIM87EBiuaQwqftkqoInGVZSL7pVOkQ 5V8FLWI6Tdcq2m+YYxm/9YoWDbgd3nqfLXbsT2vdyD0beRL8+rtPNh8aGSwDqSfhsxpJ J/0NqTRGOwxhDQ7uSNRie4/HVBu5wwibgmK0SHA+UATw3fpbdrKki8E/8jjs/oD6h0on FjoFVvd39ADaGK9Rt8hQre1IK0aj223HwKWhVFIpwWhz2Vuhmyt3NMzay6CbVZgmBX9z cnKQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CAsGDPI9lrOLA+gqaNd6lNe9s9qvvG+DW2z4UP8/jDA=; b=0yyr8KSd2Ihm8kS6cAxI8deZu5JmBZ1zu+DSESK9fQqPf94Jr0rfe2IxMe9CIkB8+a V6F7ZmMTOgYiR7K2YO9HXUNNw1M/NUBa7McXdJpI1cawJGvV4/muowP9no9c1c2RpBj5 Kof4s5xs7UI3djjIgBHUt9k4Yv2PLPavNgInEixfwtL2x83+QZiwwbTOA/4wo6KAox/A 2VWL9wKC4V4ogklScB1ppMgWrBEwMfHGvF+JqOGBSVdE2t/Wm0JULI3jXA8cvKQUgxTY ICPwGX69rp6OUFYDIyUlZWafMk80W8dk1lMAdm0lJMKd5Aj2HhMgxA+yZgpEqy5f5waF IgPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0wPuQxaX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t20-20020a170902d29400b00161a8960004si22257448plc.473.2022.06.07.22.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:46:28 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0wPuQxaX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5E056412C3F; Tue, 7 Jun 2022 22:11:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381344AbiFHAPh (ORCPT + 99 others); Tue, 7 Jun 2022 20:15:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383045AbiFGWFH (ORCPT ); Tue, 7 Jun 2022 18:05:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7381A195942; Tue, 7 Jun 2022 12:16:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 104CB618DF; Tue, 7 Jun 2022 19:16:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21189C385A2; Tue, 7 Jun 2022 19:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629380; bh=fI/KXitLdUyMzMJrXOcCXOGK+kSgctBH+i8dgQZTFtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0wPuQxaXXOECNDRV9V9ZNKrg1jgByC+hcQBWu5RxHjk2mUyYV1usnCj+vHLtffiEY Fts5FGroDnFguL6n9XItdm9LQYOCGZIqSYrlCHorQDooL6aFkTxpO2+GvWEWDsyPXn RHsiurijUsg2w63stUEDDpcjKk+G2hZruTvrCUKI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jia-Wei Chang , AngeloGioacchino Del Regno , Viresh Kumar , Sasha Levin Subject: [PATCH 5.18 669/879] cpufreq: mediatek: Use module_init and add module_exit Date: Tue, 7 Jun 2022 19:03:07 +0200 Message-Id: <20220607165022.269583633@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Jia-Wei Chang [ Upstream commit b7070187c81cb90549d7561c0e750d7c7eb751f4 ] - Use module_init instead of device_initcall. - Add a function for module_exit to unregister driver. Signed-off-by: Jia-Wei Chang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/mediatek-cpufreq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 866163883b48..9d7d9c8dc184 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -580,7 +580,13 @@ static int __init mtk_cpufreq_driver_init(void) return 0; } -device_initcall(mtk_cpufreq_driver_init); +module_init(mtk_cpufreq_driver_init) + +static void __exit mtk_cpufreq_driver_exit(void) +{ + platform_driver_unregister(&mtk_cpufreq_platdrv); +} +module_exit(mtk_cpufreq_driver_exit) MODULE_DESCRIPTION("MediaTek CPUFreq driver"); MODULE_AUTHOR("Pi-Cheng Chen "); -- 2.35.1