Q: generic module{init,exit} boilerplate

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

 



Hello all,

There are a number of drivers/modules in the kernel that have
a "do nothing" module init/exit of the form:

static int __init foo_init(void)
{
	return 0;
}
module_init(foo_init);

static void __exit foo_exit(void)
{
}
module_exit(foo_exit);

Is it worth creating a generic helper macro to handle this boilerplate?
Something along the lines of the module_driver() macro. Each use would
replace about 10 lines-of-code with a single line.

If so what would be a good name for the macro and what header would
be the appropriate place for it to reside?

Thanks for any replies!
Hartley

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux