Linux-kernel mailing list archive 1999-34,: [q] int __init init_module()?

# [q] int __init init_module()?

Tigran Aivazian (tigran@sco.COM)
Thu, 26 Aug 1999 10:16:10 +0100 (BST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: rmk@arm.linux.org.uk: "Re: 2.2.11 ppp slowdown && issues"
- Previous message: Philip Blundell: "Re: small patch for do_wp_page"
- Next in thread: David S. Miller: "Re: [q] int __init init_module()?"
- Reply: David S. Miller: "Re: [q] int __init init_module()?"

Hello,

I noticed that some drivers (e.g. drivers/sound/cmpci.c) have a code like
this:

#ifdef MODULE
int __init init_module(void)
#else
int __init init_cmpci(void)
#endif
{
....

it makes sense to have __init in front of init_cmpci() but it seems rather
suspicious to have it for a module since the code for throwing away .init*
stuff is only called from free_initmem() on boot and does not seem to be
used on loading modules?

On the other hand, if it *is* needed for init_module() then plenty of
other places must be modified to have __init. So, in all cases, some
changes are required.

Regards,
Tigran.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: rmk@arm.linux.org.uk: "Re: 2.2.11 ppp slowdown && issues"
- Previous message: Philip Blundell: "Re: small patch for do_wp_page"
- Next in thread: David S. Miller: "Re: [q] int __init init_module()?"
- Reply: David S. Miller: "Re: [q] int __init init_module()?"