2003-02-14 23:50:15

by Bob Miller

[permalink] [raw]
Subject: [PATCH 2.5.60 9/9] Update the Sun parallel port driver for new module API.

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

--
Bob Miller Email: [email protected]
Open Source Development Lab Phone: 503.626.2455 Ext. 17


diff -Nru a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
--- a/drivers/parport/parport_sunbpp.c Fri Feb 14 09:50:44 2003
+++ b/drivers/parport/parport_sunbpp.c Fri Feb 14 09:50:44 2003
@@ -249,18 +249,14 @@
parport_sunbpp_write_control(p, s->u.pc.ctr);
}

-static void parport_sunbpp_inc_use_count(void)
+static int parport_sunbpp_inc_use_count(void)
{
-#ifdef MODULE
- MOD_INC_USE_COUNT;
-#endif
+ return try_module_get(THIS_MODULE);
}

static void parport_sunbpp_dec_use_count(void)
{
-#ifdef MODULE
- MOD_DEC_USE_COUNT;
-#endif
+ module_put(THIS_MODULE);
}

static struct parport_operations parport_sunbpp_ops =