Store device file's minor/major to avoid duplicate devices.

Devices added that use the same min/maj as an already added device are ignored
by the driver. This way users can have an xorg.conf entry on
/dev/input/by-id/blahblah and not get the same device added by HAL.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
(cherry picked from commit 63af314368)
This commit is contained in:
Peter Hutterer
2008-11-17 10:03:11 +10:00
parent 29c2765fc3
commit 53566b7d4d
2 changed files with 116 additions and 0 deletions

View File

@@ -31,6 +31,7 @@
#define EVDEV_H
#include <linux/input.h>
#include <linux/types.h>
#include <xf86Xinput.h>
#include <xf86_OSproc.h>
@@ -125,6 +126,9 @@ typedef struct {
long abs_bitmask[NBITS(ABS_MAX)];
long led_bitmask[NBITS(LED_MAX)];
struct input_absinfo absinfo[ABS_MAX];
/* minor/major number */
dev_t min_maj;
} EvdevRec, *EvdevPtr;
unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);