Kirya [.net]

24 Jun, 2006

Use module_param instead of MODULE_PARM

Posted by: Julien @ 9:03 pm

Since the release of linux 2.6.17, I had some problems with several kernel modules, that still use MODULE_PARM calls. Such calls have been depreciated since the first 2.6.x releases, and their support has now been dropped out from the kernel.

For examples, Kqemu uses such a call in kqemu-linux.c. Here is a simple patch dealing with this change:

--- kqemu-linux.c.old   2006-06-24 21:00:14.000000000 +0200
+++ kqemu-linux.c       2006-06-24 21:00:19.000000000 +0200
@@ -49,7 +49,7 @@
 /* if 0 is used, then devfs/udev is used to automatically create the
    device */
 int major = 250;
-MODULE_PARM(major,"i");
+module_param(major,int,0);
 
 /* Lock the page at virtual address 'user_addr' and return its
    physical address (page index). Return a host OS private user page

As for the omnibook kernel module, of which I maintain an unofficial Debian package, please find the dpatch in my SVN repository. I shall upgrade the package shortly.

Tags: ,

No Responses to "Use module_param instead of MODULE_PARM"

Comments are closed.

About

You will find here some information about me and my different projects. I am involved in several open source projects, and try to promote Free software. This site is thus mainly dedicated to Free Software use on GNU/Linux systems. Please do not hesitate to contact me for any comments on this site.