Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4560123rwb; Tue, 6 Sep 2022 09:08:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR4MuBWl5vVDvHL8P4ttj4+SZ2mDAi8nvXP98a/dwvX8VQY1SK2fO78YiZ1Dlbkdl60Jujwr X-Received: by 2002:a17:907:2d20:b0:741:a251:1f10 with SMTP id gs32-20020a1709072d2000b00741a2511f10mr27698084ejc.400.1662480531366; Tue, 06 Sep 2022 09:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662480531; cv=none; d=google.com; s=arc-20160816; b=KJ5TDrHzyS+6EcGpUt3h/ICh7OPtFsR7Dy1ZuFpcYclaWjJru8v7F0jmZ85pS/0VdM BbOHRGyhuCg5o3kBujIki2uSm3/Yh7xboVMm6Cgy1Hd4icuYqXEjC0Q+AXMfHDuYcBwY KQbVmu5sf2UZcjqyJSfT81zJCAYfbXJV7R2M41DtPD4ebum1KOVbM/6bkyg8vGSlxUjm xj7Puxg01CVGCpb8c74N/WeU5Mi2K6MmGfTwTrkn79WGU/MaDNMJKvs4kq5gZWUHXEkT KidqZSiDiKDiKLHTcY+AKCZxR97Gtto92OzWNZLazFDNhvqpTx72uns0Dx7aKLWAMF/D GWOA== 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 :message-id:date:subject:cc:to:from; bh=RIGBvWIFcG+3TO7EqDQMSZ5cWOONJm6WXljy8dW1ILc=; b=huh9foGdCy5ezqxtp8rg1xw8uqalxxnu2Id/k9bZMHMe+ZhTPUDPLELK7XO8IHFn3y dsKzjthaTiVN741Zb1uYzFQsGMXGxVaJc1uaz26s/B/ZOsYD7kBmKXyO0QKpvlj4UTkI Ub6tbnmCwByrcXSTrPSzJLSNtBPmIzgMU54v2/jdUhIvycbMvO8T0cBn2WHlY1ADpJyG IRefnPzDCGKfKviE17jy67IU2hv93GNwWB8U987wi92QZiRLm3MlKa+rD3SiAqiCfiuF fJ9Pa7DOzKMHlSnHn1XvTTrAE3/JuOgGk15JofPfjoXt7kwtbGjhk52CFUKkeZ3jJ7Bg SQ5w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a50b412000000b00447e24d55eesi8682723edh.81.2022.09.06.09.08.24; Tue, 06 Sep 2022 09:08:51 -0700 (PDT) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233504AbiIFPpJ (ORCPT + 99 others); Tue, 6 Sep 2022 11:45:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232864AbiIFPop (ORCPT ); Tue, 6 Sep 2022 11:44:45 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC3BB7DF47; Tue, 6 Sep 2022 07:55:06 -0700 (PDT) Received: from canpemm500005.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MMSTd0nGMz1P6lL; Tue, 6 Sep 2022 22:30:13 +0800 (CST) Received: from huawei.com (10.67.174.96) by canpemm500005.china.huawei.com (7.192.104.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 6 Sep 2022 22:34:00 +0800 From: Zhang Jianhua To: , , CC: , Subject: [PATCH -next] rtc: fsl-ftm-alarm: Use module_platform_driver replace device_initcall Date: Tue, 6 Sep 2022 22:30:37 +0800 Message-ID: <20220906143037.1455317-1-chris.zjh@huawei.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.96] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500005.china.huawei.com (7.192.104.229) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 The ftm_rtc_driver has been registered while module init, however there is not unregister step for module exit, now use the macro module_platform_driver replace device_initcall, which can register and unregister platform driver automatically. Signed-off-by: Zhang Jianhua --- drivers/rtc/rtc-fsl-ftm-alarm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-fsl-ftm-alarm.c b/drivers/rtc/rtc-fsl-ftm-alarm.c index c0df49fb978c..3d7c4077fe1c 100644 --- a/drivers/rtc/rtc-fsl-ftm-alarm.c +++ b/drivers/rtc/rtc-fsl-ftm-alarm.c @@ -327,12 +327,7 @@ static struct platform_driver ftm_rtc_driver = { }, }; -static int __init ftm_alarm_init(void) -{ - return platform_driver_register(&ftm_rtc_driver); -} - -device_initcall(ftm_alarm_init); +module_platform_driver(ftm_rtc_driver); MODULE_DESCRIPTION("NXP/Freescale FlexTimer alarm driver"); MODULE_AUTHOR("Biwen Li "); -- 2.31.0