1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 9 unchanged lines hidden (view full) ---
18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/kbd/kbd.c 111748 2003-03-02 16:54:40Z des $
27 */
28
29#include "opt_kbd.h"
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/malloc.h>
--- 385 unchanged lines hidden (view full) ---
420static d_read_t genkbdread;
421static d_write_t genkbdwrite;
422static d_ioctl_t genkbdioctl;
423static d_poll_t genkbdpoll;
424
425#define CDEV_MAJOR 112
426
427static struct cdevsw kbd_cdevsw = {
428 /* open */ genkbdopen,
429 /* close */ genkbdclose,
430 /* read */ genkbdread,
431 /* write */ genkbdwrite,
432 /* ioctl */ genkbdioctl,
433 /* poll */ genkbdpoll,
434 /* mmap */ nommap,
435 /* strategy */ nostrategy,
436 /* name */ "kbd",
437 /* maj */ CDEV_MAJOR,
438 /* dump */ nodump,
439 /* psize */ nopsize,
440 /* flags */ 0,
441};
442
443int
444kbd_attach(keyboard_t *kbd)
445{
446 dev_t dev;
447
448 if (kbd->kb_index >= keyboards)
--- 805 unchanged lines hidden ---
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 9 unchanged lines hidden (view full) ---
18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/kbd/kbd.c 111748 2003-03-02 16:54:40Z des $
27 */
28
29#include "opt_kbd.h"
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/malloc.h>
--- 385 unchanged lines hidden (view full) ---
420static d_read_t genkbdread;
421static d_write_t genkbdwrite;
422static d_ioctl_t genkbdioctl;
423static d_poll_t genkbdpoll;
424
425#define CDEV_MAJOR 112
426
427static struct cdevsw kbd_cdevsw = {
428 /* open */ genkbdopen,
429 /* close */ genkbdclose,
430 /* read */ genkbdread,
431 /* write */ genkbdwrite,
432 /* ioctl */ genkbdioctl,
433 /* poll */ genkbdpoll,
434 /* mmap */ nommap,
435 /* strategy */ nostrategy,
436 /* name */ "kbd",
437 /* maj */ CDEV_MAJOR,
438 /* dump */ nodump,
439 /* psize */ nopsize,
440 /* flags */ 0,
441};
442
443int
444kbd_attach(keyboard_t *kbd)
445{
446 dev_t dev;
447
448 if (kbd->kb_index >= keyboards)
--- 805 unchanged lines hidden ---