summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorjoshua stein <jcs@cvs.openbsd.org>2004-11-11 08:28:29 +0000
committerjoshua stein <jcs@cvs.openbsd.org>2004-11-11 08:28:29 +0000
commit56bcca54a270f698c9e3bd6140e6a0c8445e8f1d (patch)
treef5832bea778b1bd95204d085670f8606d1efcfb6 /sys/arch/i386
parent4b1c80158ca232178dd544bcec45086818e33cac (diff)
no need to lock access for reading
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/nvram.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/arch/i386/i386/nvram.c b/sys/arch/i386/i386/nvram.c
index 051d19f59c8..d943a2c7d16 100644
--- a/sys/arch/i386/i386/nvram.c
+++ b/sys/arch/i386/i386/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.2 2004/10/12 16:17:14 naddy Exp $ */
+/* $OpenBSD: nvram.c,v 1.3 2004/11/11 08:28:28 jcs Exp $ */
/*
* Copyright (c) 2004 Joshua Stein <jcs@openbsd.org>
@@ -52,7 +52,6 @@ int nvramread(dev_t dev, struct uio *uio, int flags);
int nvram_csum_valid(void);
int nvram_get_byte(int byteno);
-static int nvram_opened;
static int nvram_initialized;
void
@@ -65,9 +64,7 @@ nvramattach(int num)
#ifdef NVRAM_DEBUG
printf("nvram: initialized\n");
#endif
-
nvram_initialized = 1;
- nvram_opened = 0;
} else
printf("nvram: invalid checksum\n");
}
@@ -80,22 +77,15 @@ nvramopen(dev_t dev, int flag, int mode, struct proc *p)
if ((minor(dev) != 0) || (!nvram_initialized))
return (ENXIO);
- if (nvram_opened)
- return (EBUSY);
-
if ((flag & FWRITE))
return (EPERM);
- nvram_opened = 1;
-
return (0);
}
int
nvramclose(dev_t dev, int flag, int mode, struct proc *p)
{
- nvram_opened = 0;
-
return (0);
}