[KJ] [PATCH RESUBMIT] getting rid of init_module and cleanup_module in drivers/net/3c503.c

2 views
Skip to first unread message

Liran Tal

unread,
Oct 15, 2007, 11:58:03 AM10/15/07
to kernel-janitors
getting rid of init_module and cleanup_module in older driver(s)

Signed-off-by: Liran Tal <lira...@gmail.com>
---


--- a/drivers/net/3c503.c.orig 2007-10-15 17:10:52.000000000
+0200 +++ a/drivers/net/3c503.c 2007-10-15 17:49:12.000000000
+0200 @@ -30,6 +30,8 @@
Paul Gortmaker : multiple card support for module users.
rjoh...@analogic.com : Fix up PIO interface for efficient
operation. Jeff Garzik : ethtool support
+ Liran Tal : Oct 2007 <lira...@gmail.com>
+ getting rid of init_module and
cleanup_module
*/

@@ -687,8 +689,8 @@ MODULE_LICENSE("GPL");

/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int __init
-init_module(void)
+static int __init
+module_3c503_init(void)
{
struct net_device *dev;
int this_dev, found = 0;
@@ -725,8 +727,8 @@ static void cleanup_card(struct net_devi
iounmap(ei_status.mem);
}

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

@@ -739,4 +741,9 @@ cleanup_module(void)
}
}
}
+
+
+module_init(module_3c503_init);
+module_exit(module_3c503_exit);
+
#endif /* MODULE */
_______________________________________________
REMINDER: this mailing list moved to vger.kernel.org and current one will be discontinued soon.
To resubscribe, send email to majo...@vger.kernel.org with
&quot;subscribe kernel-janitors&quot; in message body and follow instructions.

Kernel-janitors mailing list
Kernel-...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

Nishanth Aravamudan

unread,
Oct 15, 2007, 12:51:48 PM10/15/07
to Liran Tal, kernel-janitors
On 15.10.2007 [17:58:03 +0200], Liran Tal wrote:
> getting rid of init_module and cleanup_module in older driver(s)
>
> Signed-off-by: Liran Tal <lira...@gmail.com>
> ---
>
>
> --- a/drivers/net/3c503.c.orig 2007-10-15 17:10:52.000000000
> +0200 +++ a/drivers/net/3c503.c 2007-10-15 17:49:12.000000000
> +0200 @@ -30,6 +30,8 @@

Patch appears to be word-wrapped?

> Paul Gortmaker : multiple card support for module users.
> rjoh...@analogic.com : Fix up PIO interface for efficient
> operation. Jeff Garzik : ethtool support
> + Liran Tal : Oct 2007 <lira...@gmail.com>
> + getting rid of init_module and

Don't do this. The changelog is in the SCM not in the files (in this
case, git).

> cleanup_module
> */
>
> @@ -687,8 +689,8 @@ MODULE_LICENSE("GPL");
>
> /* This is set up so that only a single autoprobe takes place per call.
> ISA device autoprobes on a running machine are not recommended. */
> -int __init
> -init_module(void)
> +static int __init
> +module_3c503_init(void)

One line.

> {
> struct net_device *dev;
> int this_dev, found = 0;
> @@ -725,8 +727,8 @@ static void cleanup_card(struct net_devi
> iounmap(ei_status.mem);
> }
>
> -void __exit
> -cleanup_module(void)
> +static void __exit
> +module_3c503_exit(void)

One line.

Thanks,
Nish

--
Nishanth Aravamudan <na...@us.ibm.com>
IBM Linux Technology Center

liran tal

unread,
Oct 16, 2007, 3:42:41 AM10/16/07
to Nishanth Aravamudan, kernel-janitors
> > -void __exit
> > -cleanup_module(void)
> > +static void __exit
> > +module_3c503_exit(void)
>
> One line.
>

I'll change that too, thanks.


Regards,
Liran.

Liran Tal

unread,
Oct 16, 2007, 5:07:01 AM10/16/07
to Nishanth Aravamudan, kernel-janitors

getting rid of init_module and cleanup_module in older driver(s).
function signature is now in one line.

Signed-off-by: Liran Tal <lira...@gmail.com>
---

--- a/drivers/net/3c503.c.orig 2007-10-15 17:10:52.000000000 +0200

+++ a/drivers/net/3c503.c 2007-10-16 10:55:13.000000000 +0200
@@ -687,8 +687,7 @@ MODULE_LICENSE("GPL");



/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int __init
-init_module(void)

+static int __init module_3c503_init(void)


{
struct net_device *dev;
int this_dev, found = 0;

@@ -725,8 +724,7 @@ static void cleanup_card(struct net_devi
iounmap(ei_status.mem);
}

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

@@ -739,4 +737,9 @@ cleanup_module(void)


}
}
}
+
+
+module_init(module_3c503_init);
+module_exit(module_3c503_exit);
+
#endif /* MODULE */

Reply all
Reply to author
Forward
0 new messages