diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-03 09:36:27 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-03 09:36:27 +0000 |
commit | 1b12866bae37a06fd7f26b4aa97eec3b73665a40 (patch) | |
tree | fea25192cd0344b893e3d1d1c5d381e0c850033e /sys/dev/pci/nviic.c | |
parent | cc4849d43c0e1a7507cc242cf1c912de683125fb (diff) |
convert lockmgr style locks to rwlocks.
input from art@
Diffstat (limited to 'sys/dev/pci/nviic.c')
-rw-r--r-- | sys/dev/pci/nviic.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pci/nviic.c b/sys/dev/pci/nviic.c index 16dbc797358..57dc7ecd2e2 100644 --- a/sys/dev/pci/nviic.c +++ b/sys/dev/pci/nviic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nviic.c,v 1.10 2007/05/03 01:38:15 dlg Exp $ */ +/* $OpenBSD: nviic.c,v 1.11 2007/05/03 09:36:26 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -197,9 +197,7 @@ nviic_i2c_acquire_bus(void *arg, int flags) if (cold || (flags & I2C_F_POLL)) return (0); - rw_enter_write(&nc->nc_lock); - - return (0); + return (rw_enter(&nc->nc_lock, RW_WRITE | RW_INTR)); } void @@ -210,7 +208,7 @@ nviic_i2c_release_bus(void *arg, int flags) if (cold || (flags & I2C_F_POLL)) return; - rw_exit_write(&nc->nc_lock); + rw_exit(&nc->nc_lock); } int |