1/*-
2 * Copyright (c) 1995 Jean-Marc Zucconi
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
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/joy/joy.c 111815 2003-03-03 12:15:54Z phk $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/conf.h>
34#include <sys/uio.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
--- 26 unchanged lines hidden (view full) ---
63
64#define CDEV_MAJOR 51
65static d_open_t joyopen;
66static d_close_t joyclose;
67static d_read_t joyread;
68static d_ioctl_t joyioctl;
69
70static struct cdevsw joy_cdevsw = {
71 .d_open = joyopen,
72 .d_close = joyclose,
73 .d_read = joyread,
74 .d_ioctl = joyioctl,
75 .d_name = "joy",
76 .d_maj = CDEV_MAJOR,
77};
78
79devclass_t joy_devclass;
80
81int
82joy_probe(device_t dev)
83{
84#ifdef WANT_JOYSTICK_CONNECTED
--- 158 unchanged lines hidden ---
2 * Copyright (c) 1995 Jean-Marc Zucconi
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
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/joy/joy.c 111815 2003-03-03 12:15:54Z phk $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/conf.h>
34#include <sys/uio.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
--- 26 unchanged lines hidden (view full) ---
63
64#define CDEV_MAJOR 51
65static d_open_t joyopen;
66static d_close_t joyclose;
67static d_read_t joyread;
68static d_ioctl_t joyioctl;
69
70static struct cdevsw joy_cdevsw = {
71 .d_open = joyopen,
72 .d_close = joyclose,
73 .d_read = joyread,
74 .d_ioctl = joyioctl,
75 .d_name = "joy",
76 .d_maj = CDEV_MAJOR,
77};
78
79devclass_t joy_devclass;
80
81int
82joy_probe(device_t dev)
83{
84#ifdef WANT_JOYSTICK_CONNECTED
--- 158 unchanged lines hidden ---