diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-27 16:02:42 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-03-27 16:02:42 +0000 |
commit | 5d0cbf63df54f4d9e00ee623c47f598d54ed279a (patch) | |
tree | dae1175e325b3fb458e4ad3351b6bcabb9538d3d /sys/arch/arm/xscale/iopi2c.c | |
parent | d983bb3d1e042a0c2b7e5a22231889f9c0d7da08 (diff) |
convert iopiic lockmgr to rwlock.
ok drahn@, sthen@ tested.
Diffstat (limited to 'sys/arch/arm/xscale/iopi2c.c')
-rw-r--r-- | sys/arch/arm/xscale/iopi2c.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/arm/xscale/iopi2c.c b/sys/arch/arm/xscale/iopi2c.c index 58cc3094aa3..7d5c01aabf6 100644 --- a/sys/arch/arm/xscale/iopi2c.c +++ b/sys/arch/arm/xscale/iopi2c.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iopi2c.c,v 1.2 2006/07/10 15:39:56 drahn Exp $ */ +/* $OpenBSD: iopi2c.c,v 1.3 2009/03/27 16:02:41 oga Exp $ */ /* $NetBSD: iopi2c.c,v 1.3 2005/12/11 12:16:51 christos Exp $ */ /* @@ -40,7 +40,7 @@ * Intel i80321 I/O Processor I2C Controller Unit support. */ #include <sys/param.h> -#include <sys/lock.h> +#include <sys/rwlock.h> #include <sys/systm.h> #include <sys/device.h> #include <sys/kernel.h> @@ -96,7 +96,7 @@ iopiic_acquire_bus(void *cookie, int flags) if (flags & I2C_F_POLL) return (0); - return (lockmgr(&sc->sc_buslock, LK_EXCLUSIVE, NULL)); + return (rw_enter(&sc->sc_buslock, RW_WRITE | RW_INTR)); } static void @@ -108,7 +108,7 @@ iopiic_release_bus(void *cookie, int flags) if (flags & I2C_F_POLL) return; - (void) lockmgr(&sc->sc_buslock, LK_RELEASE, NULL); + rw_exit(&sc->sc_buslock); } #define IOPIIC_TIMEOUT 100 /* protocol timeout, in uSecs */ |