From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754459AbbLIXXv (ORCPT ); Wed, 9 Dec 2015 18:23:51 -0500 Received: from mail1.windriver.com ([147.11.146.13]:46130 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754289AbbLIXXr (ORCPT ); Wed, 9 Dec 2015 18:23:47 -0500 From: Paul Gortmaker To: CC: Paul Gortmaker , Vinod Koul , Dan Williams , Subject: [PATCH 5/6] drivers/dma: make sh/shdma-*.c explicitly non-modular Date: Wed, 9 Dec 2015 18:22:01 -0500 Message-ID: <1449703322-17762-6-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1449703322-17762-1-git-send-email-paul.gortmaker@windriver.com> References: <1449703322-17762-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Kconfig currently controlling compilation of these files is: config SH_DMAE_BASE bool "Renesas SuperH DMA Engine support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. In one file, we explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and there was not a ".remove" code assigned in the struct for it either. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. Similarly builtin_platform_driver and module_platform_driver use device_initcall, so the init ordering remains unchanged there too. In one file, We replace module.h with moduleparam.h since the file does have one module_param already. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Vinod Koul Cc: Dan Williams Cc: dmaengine@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/dma/sh/shdma-base.c | 14 ++------------ drivers/dma/sh/shdma-of.c | 11 +++-------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c index 10fcabad80f3..69097a860fc8 100644 --- a/drivers/dma/sh/shdma-base.c +++ b/drivers/dma/sh/shdma-base.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -1051,14 +1051,4 @@ static int __init shdma_enter(void) return -ENOMEM; return 0; } -module_init(shdma_enter); - -static void __exit shdma_exit(void) -{ - kfree(shdma_slave_used); -} -module_exit(shdma_exit); - -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("SH-DMA driver base library"); -MODULE_AUTHOR("Guennadi Liakhovetski "); +device_initcall(shdma_enter); diff --git a/drivers/dma/sh/shdma-of.c b/drivers/dma/sh/shdma-of.c index f999f9b0d314..888bd8761333 100644 --- a/drivers/dma/sh/shdma-of.c +++ b/drivers/dma/sh/shdma-of.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include #include #include @@ -62,18 +62,13 @@ static const struct of_device_id shdma_of_match[] = { { .compatible = "renesas,shdma-mux", }, { } }; -MODULE_DEVICE_TABLE(of, sh_dmae_of_match); static struct platform_driver shdma_of = { .driver = { .name = "shdma-of", + .suppress_bind_attrs = true, .of_match_table = shdma_of_match, }, .probe = shdma_of_probe, }; - -module_platform_driver(shdma_of); - -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("SH-DMA driver DT glue"); -MODULE_AUTHOR("Guennadi Liakhovetski "); +builtin_platform_driver(shdma_of); -- 2.6.1