From patchwork Tue Aug 15 08:02:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zetao X-Patchwork-Id: 13353648 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 86FE7C0015E for ; Tue, 15 Aug 2023 08:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235534AbjHOIDp (ORCPT ); Tue, 15 Aug 2023 04:03:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235589AbjHOIDM (ORCPT ); Tue, 15 Aug 2023 04:03:12 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 756D8113 for ; Tue, 15 Aug 2023 01:03:10 -0700 (PDT) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RQ3Zd13mXzNmpm; Tue, 15 Aug 2023 15:59:37 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 15 Aug 2023 16:03:07 +0800 From: Li Zetao To: , CC: , Subject: [PATCH -next] dmaengine: lgm: Use builtin_platform_driver macro to simplify the code Date: Tue, 15 Aug 2023 16:02:50 +0800 Message-ID: <20230815080250.1089589-1-lizetao1@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Use the builtin_platform_driver macro to simplify the code, which is the same as declaring with device_initcall(). Signed-off-by: Li Zetao Acked-by: Peter Harliman Liem --- drivers/dma/lgm/lgm-dma.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/dma/lgm/lgm-dma.c b/drivers/dma/lgm/lgm-dma.c index 1709d159af7e..4117c7b67e9c 100644 --- a/drivers/dma/lgm/lgm-dma.c +++ b/drivers/dma/lgm/lgm-dma.c @@ -1732,9 +1732,4 @@ static struct platform_driver intel_ldma_driver = { * registered DMA channels and DMA capabilities to clients before their * initialization. */ -static int __init intel_ldma_init(void) -{ - return platform_driver_register(&intel_ldma_driver); -} - -device_initcall(intel_ldma_init); +builtin_platform_driver(intel_ldma_driver);