Re: [2.6 patch] malta_mtd.c: add MODULE_LICENSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralf Baechle wrote:
> On Mon, Jun 16, 2008 at 05:34:58PM +0300, Dmitri Vorobiev wrote:
> 
>> Every time I come across this file I wonder whether this needs to be
>> modularized at all. Isn't you chainsaw itching for this as well? :)
> 
> The reason why it was implemented as a module was that due to a MTD
> "feature" the code wouldn't compile in 2.6.20 and earlier.  So yes, I
> chainsawed it into the right shape, patch is on the way to Linus.

Looks like Linus has applied the patch.

I think that module_init() needs to be replaced by device_initcall() in
malta_mtd.c. Not that it would make any difference at all, but just some
nitpicking - I simply get a bit nervous and irritated when looking at
the `module' word in the core kernel code. :)

Patch attached.

Dmitri

> 
>   Ralf
> 

>From e627bede02089936e52dc0f5c2d57b099bdbece9 Mon Sep 17 00:00:00 2001
From: Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxx>
Date: Tue, 17 Jun 2008 11:44:55 +0300
Subject: [PATCH 1/1] [MIPS] Get rid of module_init() in core kernel code

Now that the Malta MTD driver cannot be compiled as a module
due to commit b8157180ccd8bb3752f510c6c434b86394636093, arrange
calling the driver initialization routine via device_initcall()
macro instead of module_init().

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxx>
---
 arch/mips/mips-boards/malta/malta_mtd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/mips-boards/malta/malta_mtd.c b/arch/mips/mips-boards/malta/malta_mtd.c
index 8ad9bdf..f24f654 100644
--- a/arch/mips/mips-boards/malta/malta_mtd.c
+++ b/arch/mips/mips-boards/malta/malta_mtd.c
@@ -60,4 +60,4 @@ static int __init malta_mtd_init(void)
 	return 0;
 }
 
-module_init(malta_mtd_init)
+device_initcall(malta_mtd_init);
-- 
1.5.5.GIT


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux