diff options
author | bde <bde@FreeBSD.org> | 1997-11-18 12:21:32 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-11-18 12:21:32 +0000 |
commit | 2445838f45b1defb5d6138454dd45e67c72522ee (patch) | |
tree | 1d25a7f002bb153e5aa77df130c27579899ded93 | |
parent | fe379def7df8266b390c0dac735475467e9ba677 (diff) | |
download | FreeBSD-src-2445838f45b1defb5d6138454dd45e67c72522ee.zip FreeBSD-src-2445838f45b1defb5d6138454dd45e67c72522ee.tar.gz |
Get select stuff by including <sys/select.h> instead of <sys/proc.h>,
and don't include <sys/fcntl.h>. (The select -> poll changes replaced
fcntl macros by poll macros.)
Use <machine/*.h> instead of <i386/include/*.h>.
Fail the probe instead of crashing in the unlikely event that malloc()
fails.
-rw-r--r-- | sys/i386/isa/psm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/i386/isa/psm.c b/sys/i386/isa/psm.c index dff8ced..9dc9d9c 100644 --- a/sys/i386/isa/psm.c +++ b/sys/i386/isa/psm.c @@ -19,7 +19,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.43 1997/10/19 10:44:29 yokota Exp $ + * $Id: psm.c,v 1.44 1997/11/07 08:52:41 phk Exp $ */ /* @@ -66,8 +66,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/fcntl.h> -#include <sys/proc.h> #include <sys/conf.h> #include <sys/poll.h> #include <sys/syslog.h> @@ -75,10 +73,11 @@ #ifdef DEVFS #include <sys/devfsext.h> #endif +#include <sys/select.h> -#include <i386/include/mouse.h> -#include <i386/include/clock.h> -#include <i386/include/apm_bios.h> +#include <machine/apm_bios.h> +#include <machine/clock.h> +#include <machine/mouse.h> #include <i386/isa/isa_device.h> #include <i386/isa/kbdio.h> @@ -581,6 +580,8 @@ psmprobe(struct isa_device *dvp) psm_softc[unit] = NULL; sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT); + if (sc == NULL) + return (0); bzero(sc, sizeof *sc); sc->addr = dvp->id_iobase; |