update md driver to new module API

update md driver to new module API

Post by Daniel McNei » Fri, 21 Mar 2003 01:40:19



This patch updates the md driver and personalities to the new
module interfaces.

An owner field has been added to the struct mdk_personality_s.
This is initialized by each personality module.  The md driver
now attempts to take a reference to the personality before calling
the personality's run routine.  A pers_lock was added to protect
the setting, clearing and reading of pers[] entries. This protects
try_module_get() racing with unregister_md_personality().

I have tested each personality as a module.

--

  patch-2.5.65-md
9K Download
 
 
 

1. Update the Amiga parallel port driver for new module API.

The patch below updates the Amiga parallel port driver to use the new module
interfaces.  This hasn't been test (sorry no hardware).

--

Open Source Development Lab                     Phone: 503.626.2455 Ext. 17

diff -Nru a/drivers/parport/parport_amiga.c b/drivers/parport/parport_amiga.c
--- a/drivers/parport/parport_amiga.c   Fri Feb 14 09:50:44 2003

        mb();
 }

-static void amiga_inc_use_count(void)
+static int amiga_inc_use_count(void)
 {
-       MOD_INC_USE_COUNT;
+       return try_module_get(THIS_MODULE);
 }

 static void amiga_dec_use_count(void)
 {
-       MOD_DEC_USE_COUNT;
+       module_put(THIS_MODULE);
 }

 static struct parport_operations pp_amiga_ops = {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. PPP and Netcom, Can't get pppd and chat to work...need someones script files...

3. Update the Archimedes parallel port driver for new module API.

4. How to check free disk space

5. Update parport class driver to new module loader API.

6. mod_rewrite and /

7. Update the Atari parallel port driver for new module API.

8. The PARALLEL Processing Connection - What Is It?

9. Update the PC parallel port driver for new module API.

10. Update the GSC-Bus parallel port driver for new module API.

11. Update the Multiface 3 parallel port driver for new module API.

12. Update the Sun parallel port driver for new module API.

13. Update parallel port drivers to module loader API.