diff options
| author | Vojtech Pavlik <vojtech@twilight.ucw.cz> | 2002-07-25 02:57:12 +0200 |
|---|---|---|
| committer | Vojtech Pavlik <vojtech@twilight.ucw.cz> | 2002-07-25 02:57:12 +0200 |
| commit | 7d30d1df118d5b27a559e590475897e1b09f0ebe (patch) | |
| tree | 265dd5ea0002f735fd741434c21d64cbeedcd969 /include/linux | |
| parent | 5ab506c839e31507399184d6952b9bb62ff2188f (diff) | |
This patch by Brad Hards replaces the four id* fields of the input
struct by a single struct to simplify passing it around and to
userspace.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gameport.h | 5 | ||||
| -rw-r--r-- | include/linux/input.h | 19 | ||||
| -rw-r--r-- | include/linux/uinput.h | 5 |
3 files changed, 12 insertions, 17 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 0cb1a3b46f77..7bf3bccf0fda 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h @@ -39,10 +39,7 @@ struct gameport { char *name; char *phys; - unsigned short idbus; - unsigned short idvendor; - unsigned short idproduct; - unsigned short idversion; + struct input_devinfo id; int io; int speed; diff --git a/include/linux/input.h b/include/linux/input.h index 28cc98e91037..ca8d8fa55a77 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -56,8 +56,15 @@ struct input_event { * IOCTLs (0x00 - 0x7f) */ +struct input_devinfo { + uint16_t bustype; + uint16_t vendor; + uint16_t product; + uint16_t version; +}; + #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ -#define EVIOCGID _IOR('E', 0x02, short[4]) /* get device ID */ +#define EVIOCGID _IOR('E', 0x02, struct input_devinfo) /* get device ID */ #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCSREP _IOW('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ @@ -742,10 +749,7 @@ struct input_dev { char *name; char *phys; char *uniq; - unsigned short idbus; - unsigned short idvendor; - unsigned short idproduct; - unsigned short idversion; + struct input_devinfo id; unsigned long evbit[NBITS(EV_MAX)]; unsigned long keybit[NBITS(KEY_MAX)]; @@ -818,10 +822,7 @@ struct input_device_id { unsigned long flags; - unsigned short idbus; - unsigned short idvendor; - unsigned short idproduct; - unsigned short idversion; + struct input_devinfo id; unsigned long evbit[NBITS(EV_MAX)]; unsigned long keybit[NBITS(KEY_MAX)]; diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 6754ab4e0952..528b27a21d78 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h @@ -64,10 +64,7 @@ struct uinput_device { #define UINPUT_MAX_NAME_SIZE 80 struct uinput_user_dev { char name[UINPUT_MAX_NAME_SIZE]; - unsigned short idbus; - unsigned short idvendor; - unsigned short idproduct; - unsigned short idversion; + struct input_devinfo id; int ff_effects_max; int absmax[ABS_MAX + 1]; int absmin[ABS_MAX + 1]; |
