This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / Documentation / DocBook / videobook.tmpl
index 2c92b18..45243ee 100644 (file)
@@ -731,14 +731,13 @@ static int io = 0x300;
 
 static int io = -1;
 
-#endif
 
 MODULE_AUTHOR("Alan Cox");
 MODULE_DESCRIPTION("A driver for an imaginary radio card.");
-module_param(io, int, 0444);
+MODULE_PARM(io, "i");
 MODULE_PARM_DESC(io, "I/O address of the card.");
 
-static int __init init(void)
+int init_module(void)
 {
         if(io==-1)
         {
@@ -749,26 +748,25 @@ static int __init init(void)
         return myradio_init(NULL);
 }
 
-static void __exit cleanup(void)
+void cleanup_module(void)
 {
         video_unregister_device(&my_radio);
         release_region(io, MY_IO_SIZE);
 }
 
-module_init(init);
-module_exit(cleanup);
+#endif
 
   </programlisting>
   <para>
         In this example we set the IO base by default if the driver is compiled into
-        the kernel: you can still set it using "my_radio.irq" if this file is called <filename>my_radio.c</filename>. For the module we require the
+        the kernel where you cannot pass a parameter. For the module we require the
         user sets the parameter. We set io to a nonsense port (-1) so that we can
         tell if the user supplied an io parameter or not.
   </para>
   <para>
         We use MODULE_ defines to give an author for the card driver and a
         description. We also use them to declare that io is an integer and it is the
-        address of the card, and can be read by anyone from sysfs.
+        address of the card.
   </para>
   <para>
         The clean-up routine unregisters the video_device we registered, and frees