2008-02-28 07:32:22

by Jon Schindler

[permalink] [raw]
Subject: [PATCH 2/9] /drivers/net/8390.c replaced init_module&cleanup_module with module_init&module_exit

Replaced init_module and cleanup_module with static functions and module_init/module_exit.

Signed-off-by: Jon Schindler <[email protected]>
---
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c
index 5136d94..b144863 100644
--- a/drivers/net/ac3200.c
+++ b/drivers/net/ac3200.c
@@ -369,7 +369,7 @@ MODULE_PARM_DESC(mem, "Memory base address(es)");
MODULE_DESCRIPTION("Ansel AC3200 EISA ethernet driver");
MODULE_LICENSE("GPL");

-int __init init_module(void)
+static int __init ac3200_module_init(void)
{
struct net_device *dev;
int this_dev, found = 0;
@@ -404,8 +404,7 @@ static void cleanup_card(struct net_device *dev)
iounmap(ei_status.mem);
}

-void __exit
-cleanup_module(void)
+static void __exit ac3200_module_exit(void)
{
int this_dev;

@@ -418,4 +417,6 @@ cleanup_module(void)
}
}
}
+module_init(ac3200_module_init);
+module_exit(ac3200_module_exit);
#endif /* MODULE */


2008-03-01 01:24:33

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 2/9] /drivers/net/8390.c replaced init_module&cleanup_module with module_init&module_exit

On Thu, 28 Feb 2008 01:30:25 -0600
Jon Schindler <[email protected]> wrote:

> Replaced init_module and cleanup_module with static functions and module_init/module_exit.

I get

drivers/net/8390.c: In function '__inittest':
drivers/net/8390.c:60: error: 'ns8390_init_module' undeclared (first use in this function)
drivers/net/8390.c:60: error: (Each undeclared identifier is reported only once
drivers/net/8390.c:60: error: for each function it appears in.)
drivers/net/8390.c: At top level:
drivers/net/8390.c:60: error: 'init_module' aliased to undefined symbol 'ns8390_init_module'

2008-03-01 02:36:58

by Jon Schindler

[permalink] [raw]
Subject: Re: [PATCH 2/9] /drivers/net/8390.c replaced init_module&cleanup_module with module_init&module_exit

I'm sorry, ns8390_init_module should be ns8390_module_init. I'll resend it in the next reply.
Andrew Morton wrote:
> On Thu, 28 Feb 2008 01:30:25 -0600
> Jon Schindler <[email protected]> wrote:
>
>> Replaced init_module and cleanup_module with static functions and module_init/module_exit.
>
> I get
>
> drivers/net/8390.c: In function '__inittest':
> drivers/net/8390.c:60: error: 'ns8390_init_module' undeclared (first use in this function)
> drivers/net/8390.c:60: error: (Each undeclared identifier is reported only once
> drivers/net/8390.c:60: error: for each function it appears in.)
> drivers/net/8390.c: At top level:
> drivers/net/8390.c:60: error: 'init_module' aliased to undefined symbol 'ns8390_init_module'
>
>

2008-03-01 02:50:29

by Jon Schindler

[permalink] [raw]
Subject: Re: [PATCH 2/9] /drivers/net/8390.c replaced init_module&cleanup_module with module_init&module_exit

I've also noticed another issue, it appears that I accidentally gave PATCH 2/9 the wrong subject. Patch 2/9
actually fixes /drivers/net/ac3200.c, while PATCH 1/9 is the one that fixes /drivers/net/8390.c.
What's the easiest way to fix these two patches? Do you want to just back out patches 1 & 2 and
I can send them as part of a different patch set? If I change the subject for PATCH 2/9, it might
be hard for others to follow this thread.

Sorry for the trouble, I'm still getting familiar the mechanics of patch submission.

Jon
Jon Schindler wrote:
> I'm sorry, ns8390_init_module should be ns8390_module_init. I'll resend it in the next reply.
> Andrew Morton wrote:
>> On Thu, 28 Feb 2008 01:30:25 -0600
>> Jon Schindler <[email protected]> wrote:
>>
>>> Replaced init_module and cleanup_module with static functions and module_init/module_exit.
>> I get
>>
>> drivers/net/8390.c: In function '__inittest':
>> drivers/net/8390.c:60: error: 'ns8390_init_module' undeclared (first use in this function)
>> drivers/net/8390.c:60: error: (Each undeclared identifier is reported only once
>> drivers/net/8390.c:60: error: for each function it appears in.)
>> drivers/net/8390.c: At top level:
>> drivers/net/8390.c:60: error: 'init_module' aliased to undefined symbol 'ns8390_init_module'
>>
>>
>