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 111815 2003-03-03 12:15:54Z phk $
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 .d_open = genkbdopen,
429 .d_close = genkbdclose,
430 .d_read = genkbdread,
431 .d_write = genkbdwrite,
432 .d_ioctl = genkbdioctl,
433 .d_poll = genkbdpoll,
434 .d_name = "kbd",
435 .d_maj = CDEV_MAJOR,
436};
437
438int
439kbd_attach(keyboard_t *kbd)
440{
441 dev_t dev;
442
443 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 111815 2003-03-03 12:15:54Z phk $
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 .d_open = genkbdopen,
429 .d_close = genkbdclose,
430 .d_read = genkbdread,
431 .d_write = genkbdwrite,
432 .d_ioctl = genkbdioctl,
433 .d_poll = genkbdpoll,
434 .d_name = "kbd",
435 .d_maj = CDEV_MAJOR,
436};
437
438int
439kbd_attach(keyboard_t *kbd)
440{
441 dev_t dev;
442
443 if (kbd->kb_index >= keyboards)
--- 805 unchanged lines hidden ---