tags 415050 + patch
thanks

Hello,

After searching on google, I  wrote the attached patch. Could you please
test it and tell me if it works fine?

Cheers,
Arnaud Fontaine

diff -urN 2.6.old/drivers/rtcmosram.c 2.6/drivers/rtcmosram.c
--- 2.6.old/drivers/rtcmosram.c	2007-05-07 15:47:02.000000000 +0200
+++ 2.6/drivers/rtcmosram.c	2007-05-06 00:53:58.000000000 +0200
@@ -226,8 +226,6 @@
 	}
 	/* proc entry created */
 
-	inter_module_register( _szImName, THIS_MODULE, &rtcmosram_do );
-
 	return 0;
 }
 
@@ -235,8 +233,6 @@
 static void __exit rtcmosram_exit( void )
 {
 
-	inter_module_unregister( _szImName );
-
  	remove_proc_entry( _szProcfile, NULL );
 
 	if ( _presourceRtcmosram != NULL ) release_resource( _presourceRtcmosram );
diff -urN 2.6.old/drivers/smapi_core.c 2.6/drivers/smapi_core.c
--- 2.6.old/drivers/smapi_core.c	2007-05-07 15:47:02.000000000 +0200
+++ 2.6/drivers/smapi_core.c	2007-05-06 00:53:25.000000000 +0200
@@ -298,8 +298,6 @@
 	}
 	/* proc entry created */
 
-	inter_module_register( _szImName, THIS_MODULE, &smapi_do );
-
 	return 0;
 }
 
@@ -307,8 +305,6 @@
 static void __exit smapi_exit( void )
 {
 
-	inter_module_unregister( _szImName );
-
 	remove_proc_entry( _szProcfile, NULL );
 
 	return;
diff -urN 2.6.old/drivers/superio.c 2.6/drivers/superio.c
--- 2.6.old/drivers/superio.c	2007-05-07 15:47:02.000000000 +0200
+++ 2.6/drivers/superio.c	2007-05-06 00:52:40.000000000 +0200
@@ -887,8 +887,6 @@
 	}
 	/* proc entry created */
 
-	inter_module_register( _szImName, THIS_MODULE, &superio_do );
-
 	return 0;
 }
 
@@ -896,8 +894,6 @@
 static void __exit superio_exit( void )
 {
 
-	inter_module_unregister( _szImName );
-
  	remove_proc_entry( _szProcfile, NULL );
 
 	if ( _presourceSuperio != NULL ) release_resource( _presourceSuperio );
diff -urN 2.6.old/drivers/thinkpad.c 2.6/drivers/thinkpad.c
--- 2.6.old/drivers/thinkpad.c	2007-05-07 15:47:02.000000000 +0200
+++ 2.6/drivers/thinkpad.c	2007-05-06 00:52:06.000000000 +0200
@@ -230,13 +230,13 @@
 			pxint_do_t pxint_doSmapi;
 			int intRet;
 			if ( ! enable_smapi ) return -ETHINKPAD_MODULE_DISABLED;
-			pxint_doSmapi = (pxint_do_t)inter_module_get_request( "smapi_do" , _szSmapiName );
+			pxint_doSmapi = (pxint_do_t)symbol_get( "smapi_do" );
 			if ( pxint_doSmapi == NULL ) return -ETHINKPAD_MODULE_NOT_FOUND;
 			intRet = (*pxint_doSmapi)(
 				ulongIoctlArg, 
 				caller_has_w( pfileThe )
 			);
-			inter_module_put("smapi_do");
+			symbol_put_addr("smapi_do");
 			if ( intRet > 0 ) intRet = -ETHINKPAD_PROGRAMMING;
 			return intRet;
 		}
@@ -245,13 +245,13 @@
 			pxint_do_t pxint_doSuperio;
 			int intRet;
 			if ( ! enable_superio ) return -ETHINKPAD_MODULE_DISABLED;
-			pxint_doSuperio = (pxint_do_t)inter_module_get_request( "superio_do" , _szSuperioName );
+			pxint_doSuperio = (pxint_do_t)symbol_get( "superio_do" );
 			if ( pxint_doSuperio == NULL ) return -ETHINKPAD_MODULE_NOT_FOUND;
 			intRet = (*pxint_doSuperio)(
 				ulongIoctlArg, 
 				caller_has_w( pfileThe )
 			);
-			inter_module_put("superio_do");
+			symbol_put_addr("superio_do");
 			if ( intRet > 0 ) intRet = -ETHINKPAD_PROGRAMMING;
 			return intRet;
 		}
@@ -260,13 +260,13 @@
 			pxint_do_t pxint_doRtcmosram;
 			int intRet;
 			if ( ! enable_rtcmosram ) return -ETHINKPAD_MODULE_DISABLED;
-			pxint_doRtcmosram = (pxint_do_t)inter_module_get_request( "rtcmosram_do" , _szRtcmosramName );
+			pxint_doRtcmosram = (pxint_do_t)symbol_get( "rtcmosram_do" );
 			if ( pxint_doRtcmosram == NULL ) return -ETHINKPAD_MODULE_NOT_FOUND;
 			intRet = (*pxint_doRtcmosram)(
 				ulongIoctlArg, 
 				caller_has_w( pfileThe )
 			);
-			inter_module_put("rtcmosram_do");
+			symbol_put_addr("rtcmosram_do");
 			if ( intRet > 0 ) intRet = -ETHINKPAD_PROGRAMMING;
 			return intRet;
 		}
diff -urN 2.6.old/drivers/thinkpadpm.c 2.6/drivers/thinkpadpm.c
--- 2.6.old/drivers/thinkpadpm.c	2007-05-07 15:47:02.000000000 +0200
+++ 2.6/drivers/thinkpadpm.c	2007-05-06 00:54:13.000000000 +0200
@@ -516,8 +516,6 @@
 	}
 	/* proc entry created */
 
-	inter_module_register( _szImName, THIS_MODULE, &thinkpadpm_do );
-
 	return 0;
 }
 
@@ -525,8 +523,6 @@
 static void __exit thinkpadpm_exit( void )
 {
 
-	inter_module_unregister( _szImName );
-
 	remove_proc_entry( _szProcfile, NULL );
 
 	return;

Attachment: pgpDrX5L5FSvn.pgp
Description: PGP signature

Reply via email to