From patchwork Thu Jan 12 13:54:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 13097999 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 378B3C54EBD for ; Thu, 12 Jan 2023 13:37:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 16AD48E1A; Thu, 12 Jan 2023 14:36:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 16AD48E1A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1673530662; bh=C5+FWrng63sIPJa8OZgcxEExYnM/Z7qsx3WnIsX6ACU=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=imapP/kPFyo3DjioQ2+b4J3IzoUlPbrYet4GCT3vVD8WFLXvoCvrNTO+FkjQBu6Nq CqVPcOR9w6YsxGYGlGd2/lNWTmkB374zyNYE+0CPaSieYg7qvD64RI3iNJdamPNniG Kupk86hRwLoR4PTmCHsELy+9RfAuXfu9Gen9xP0A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BE2C3F804BD; Thu, 12 Jan 2023 14:36:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7CBF6F8016E; Thu, 12 Jan 2023 14:36:50 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8C5A6F8016E for ; Thu, 12 Jan 2023 14:36:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8C5A6F8016E Received: from dggpemm100007.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Nt5813lyMzJqJV; Thu, 12 Jan 2023 21:32:33 +0800 (CST) Received: from huawei.com (10.175.103.91) by dggpemm100007.china.huawei.com (7.185.36.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 12 Jan 2023 21:36:41 +0800 From: Yang Yingliang To: Subject: [PATCH -next] ASoC: ti: davinci-evm: simplify the code with module_platform_driver Date: Thu, 12 Jan 2023 21:54:57 +0800 Message-ID: <20230112135457.1490360-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100007.china.huawei.com (7.185.36.116) X-CFilter-Loop: Reflected X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, yangyingliang@huawei.com, peter.ujfalusi@gmail.com Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The init/exit() of driver only calls platform_driver_register/unregister, it can be simpilfied with module_platform_driver. Signed-off-by: Yang Yingliang Acked-by: Peter Ujfalusi --- sound/soc/ti/davinci-evm.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c index 983d69b951b0..544cb3da50eb 100644 --- a/sound/soc/ti/davinci-evm.c +++ b/sound/soc/ti/davinci-evm.c @@ -257,18 +257,7 @@ static struct platform_driver davinci_evm_driver = { }, }; -static int __init evm_init(void) -{ - return platform_driver_register(&davinci_evm_driver); -} - -static void __exit evm_exit(void) -{ - platform_driver_unregister(&davinci_evm_driver); -} - -module_init(evm_init); -module_exit(evm_exit); +module_platform_driver(davinci_evm_driver); MODULE_AUTHOR("Vladimir Barinov"); MODULE_DESCRIPTION("TI DAVINCI EVM ASoC driver");