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 97748 2002-06-02 20:05:59Z schweikh $
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 /* open */ joyopen,
72 /* close */ joyclose,
73 /* read */ joyread,
74 /* write */ nowrite,
75 /* ioctl */ joyioctl,
76 /* poll */ nopoll,
77 /* mmap */ nommap,
78 /* strategy */ nostrategy,
79 /* name */ "joy",
80 /* maj */ CDEV_MAJOR,
81 /* dump */ nodump,
82 /* psize */ nopsize,
83 /* flags */ 0,
84};
85
86devclass_t joy_devclass;
87
88int
89joy_probe(device_t dev)
90{
91#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 97748 2002-06-02 20:05:59Z schweikh $
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 /* open */ joyopen,
72 /* close */ joyclose,
73 /* read */ joyread,
74 /* write */ nowrite,
75 /* ioctl */ joyioctl,
76 /* poll */ nopoll,
77 /* mmap */ nommap,
78 /* strategy */ nostrategy,
79 /* name */ "joy",
80 /* maj */ CDEV_MAJOR,
81 /* dump */ nodump,
82 /* psize */ nopsize,
83 /* flags */ 0,
84};
85
86devclass_t joy_devclass;
87
88int
89joy_probe(device_t dev)
90{
91#ifdef WANT_JOYSTICK_CONNECTED
--- 158 unchanged lines hidden ---