summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@suse.cz>2002-10-08 17:16:29 +0200
committerVojtech Pavlik <vojtech@suse.cz>2002-10-08 17:16:29 +0200
commit7a017c2b6b29c18a2a3060b7534897af4c0b9d9a (patch)
treee1e25ad3d886f8405114a446e9650ded1b3a8d26 /include/linux
parent0bf36f291063c1bec51a12cbf4b072ec5f0aacd1 (diff)
parent368b9617a7b2aed49881b82c311f50036101838a (diff)
Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/gameport.h32
-rw-r--r--include/linux/input.h30
-rw-r--r--include/linux/keyboard.h5
-rw-r--r--include/linux/serio.h51
4 files changed, 40 insertions, 78 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index f13fad0db609..15d4479549eb 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -2,33 +2,16 @@
#define _GAMEPORT_H
/*
- * $Id: gameport.h,v 1.20 2002/01/03 08:55:05 vojtech Exp $
+ * Copyright (c) 1999-2002 Vojtech Pavlik
*
- * Copyright (c) 1999-2001 Vojtech Pavlik
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
*/
#include <asm/io.h>
#include <linux/input.h>
+#include <linux/list.h>
struct gameport;
@@ -53,7 +36,8 @@ struct gameport {
void (*close)(struct gameport *);
struct gameport_dev *dev;
- struct gameport *next;
+
+ struct list_head node;
};
struct gameport_dev {
@@ -64,7 +48,7 @@ struct gameport_dev {
void (*connect)(struct gameport *, struct gameport_dev *dev);
void (*disconnect)(struct gameport *);
- struct gameport_dev *next;
+ struct list_head node;
};
int gameport_open(struct gameport *gameport, struct gameport_dev *dev, int mode);
diff --git a/include/linux/input.h b/include/linux/input.h
index ade9c87a955d..51274d62b6f3 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -2,33 +2,16 @@
#define _INPUT_H
/*
- * $Id: input.h,v 1.68 2002/05/31 10:35:49 fsirl Exp $
+ * Copyright (c) 1999-2002 Vojtech Pavlik
*
- * Copyright (c) 1999-2001 Vojtech Pavlik
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
*/
#ifdef __KERNEL__
#include <linux/time.h>
+#include <linux/list.h>
#else
#include <sys/time.h>
#include <sys/ioctl.h>
@@ -349,6 +332,7 @@ struct input_absinfo {
#define KEY_CANCEL 223
#define KEY_BRIGHTNESSDOWN 224
#define KEY_BRIGHTNESSUP 225
+#define KEY_MEDIA 226
#define KEY_UNKNOWN 240
@@ -760,6 +744,8 @@ struct ff_effect {
#define INPUT_KEYCODE(dev, scancode) ((dev->keycodesize == 1) ? ((u8*)dev->keycode)[scancode] : \
((dev->keycodesize == 1) ? ((u16*)dev->keycode)[scancode] : (((u32*)dev->keycode)[scancode])))
+#define init_input_dev(dev) do { INIT_LIST_HEAD(&((dev)->h_list)); INIT_LIST_HEAD(&((dev)->node)); } while (0)
+
struct input_dev {
void *private;
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h
index caa66cd98d18..5bd97c23e72b 100644
--- a/include/linux/keyboard.h
+++ b/include/linux/keyboard.h
@@ -2,6 +2,7 @@
#define __LINUX_KEYBOARD_H
#include <linux/wait.h>
+#include <linux/input.h>
#define KG_SHIFT 0
#define KG_CTRL 2
@@ -15,9 +16,9 @@
#define NR_SHIFT 9
-#define NR_KEYS 128
+#define NR_KEYS (KEY_MAX+1)
#define MAX_NR_KEYMAPS 256
-/* This means 64Kb if all keymaps are allocated. Only the superuser
+/* This means 128Kb if all keymaps are allocated. Only the superuser
may increase the number of keymaps beyond MAX_NR_OF_USER_KEYMAPS. */
#define MAX_NR_OF_USER_KEYMAPS 256 /* should be at least 7 */
diff --git a/include/linux/serio.h b/include/linux/serio.h
index ce0359b25fb7..b0690405229d 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -2,36 +2,16 @@
#define _SERIO_H
/*
- * $Id: serio.h,v 1.21 2001/12/19 05:15:21 skids Exp $
- *
- * Copyright (C) 1999-2001 Vojtech Pavlik
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
- */
-
-/*
- * The serial port set type ioctl.
+ * Copyright (C) 1999-2002 Vojtech Pavlik
+*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
*/
#include <linux/ioctl.h>
+#include <linux/list.h>
+
#define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
struct serio;
@@ -57,7 +37,8 @@ struct serio {
void (*close)(struct serio *);
struct serio_dev *dev;
- struct serio *next;
+
+ struct list_head node;
};
struct serio_dev {
@@ -69,8 +50,9 @@ struct serio_dev {
void (*interrupt)(struct serio *, unsigned char, unsigned int);
void (*connect)(struct serio *, struct serio_dev *dev);
void (*disconnect)(struct serio *);
+ void (*cleanup)(struct serio *);
- struct serio_dev *next;
+ struct list_head node;
};
int serio_open(struct serio *serio, struct serio_dev *dev);
@@ -85,7 +67,10 @@ void serio_unregister_device(struct serio_dev *dev);
static __inline__ int serio_write(struct serio *serio, unsigned char data)
{
- return serio->write(serio, data);
+ if (serio->write)
+ return serio->write(serio, data);
+ else
+ return -1;
}
static __inline__ void serio_dev_write_wakeup(struct serio *serio)
@@ -94,6 +79,12 @@ static __inline__ void serio_dev_write_wakeup(struct serio *serio)
serio->dev->write_wakeup(serio);
}
+static __inline__ void serio_cleanup(struct serio *serio)
+{
+ if (serio->dev && serio->dev->cleanup)
+ serio->dev->cleanup(serio);
+}
+
/*
* bit masks for use in "interrupt" flags (3rd argument)
*/