summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev/sram.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme88k/dev/sram.c')
-rw-r--r--sys/arch/mvme88k/dev/sram.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/arch/mvme88k/dev/sram.c b/sys/arch/mvme88k/dev/sram.c
index 544ec82bad9..39f91c8216a 100644
--- a/sys/arch/mvme88k/dev/sram.c
+++ b/sys/arch/mvme88k/dev/sram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sram.c,v 1.15 2004/01/14 20:50:48 miod Exp $ */
+/* $OpenBSD: sram.c,v 1.16 2004/04/15 21:35:59 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -157,20 +157,7 @@ sramioctl(dev, cmd, data, flag, p)
/*ARGSUSED*/
int
-sramread(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
-{
- int unit = minor(dev);
- struct sramsoftc *sc = (struct sramsoftc *) sram_cd.cd_devs[unit];
-
- return (memdevrw(sc->sc_vaddr, sc->sc_len, uio, flags));
-}
-
-/*ARGSUSED*/
-int
-sramwrite(dev, uio, flags)
+sramrw(dev, uio, flags)
dev_t dev;
struct uio *uio;
int flags;
@@ -194,7 +181,7 @@ srammmap(dev, off, prot)
return (-1);
/* allow access only in RAM */
- if (off > sc->sc_len)
+ if (off < 0 || off > sc->sc_len)
return (-1);
return (atop(sc->sc_paddr + off));
}