View | Details | Raw Unified | Return to bug 181133
Collapse All | Expand All

(-)files/patch-src-Makefile.in (-40 lines)
Lines 1-40 Link Here
1
--- src/Makefile.in.orig
2
+++ src/Makefile.in
3
@@ -97,7 +97,7 @@ am__base_list = \
4
 am__installdirs = "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)"
5
 LTLIBRARIES = $(@DRIVER_NAME@_drv_la_LTLIBRARIES)
6
 @DRIVER_NAME@_drv_la_LIBADD =
7
-am__objects_1 = xf86Wacom.lo wcmCommon.lo wcmConfig.lo wcmISDV4.lo \
8
+am__objects_1 = xf86Wacom.lo wcmCommon.lo wcmConfig.lo \
9
 	wcmFilter.lo wcmUSB.lo wcmXCommand.lo wcmValidateDevice.lo \
10
 	wcmTouchFilter.lo
11
 am_@DRIVER_NAME@_drv_la_OBJECTS = $(am__objects_1)
12
@@ -291,7 +291,6 @@ DRIVER_SOURCES = \
13
 	$(top_srcdir)/src/xf86Wacom.h \
14
 	$(top_srcdir)/src/wcmCommon.c \
15
 	$(top_srcdir)/src/wcmConfig.c \
16
-	$(top_srcdir)/src/wcmISDV4.c \
17
 	$(top_srcdir)/src/wcmFilter.c \
18
 	$(top_srcdir)/src/wcmFilter.h \
19
 	$(top_srcdir)/src/xf86WacomDefs.h \
20
@@ -383,7 +382,6 @@ distclean-compile:
21
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmCommon.Plo@am__quote@
22
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmConfig.Plo@am__quote@
23
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmFilter.Plo@am__quote@
24
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmISDV4.Plo@am__quote@
25
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmTouchFilter.Plo@am__quote@
26
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmUSB.Plo@am__quote@
27
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcmValidateDevice.Plo@am__quote@
28
@@ -467,12 +465,7 @@ wcmConfig.lo: $(top_srcdir)/src/wcmConfi
29
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
30
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wcmConfig.lo `test -f '$(top_srcdir)/src/wcmConfig.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmConfig.c
31
 
32
-wcmISDV4.lo: $(top_srcdir)/src/wcmISDV4.c
33
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wcmISDV4.lo -MD -MP -MF $(DEPDIR)/wcmISDV4.Tpo -c -o wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c
34
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/wcmISDV4.Tpo $(DEPDIR)/wcmISDV4.Plo
35
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$(top_srcdir)/src/wcmISDV4.c' object='wcmISDV4.lo' libtool=yes @AMDEPBACKSLASH@
36
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
37
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wcmISDV4.lo `test -f '$(top_srcdir)/src/wcmISDV4.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmISDV4.c
38
 
39
 wcmFilter.lo: $(top_srcdir)/src/wcmFilter.c
40
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wcmFilter.lo -MD -MP -MF $(DEPDIR)/wcmFilter.Tpo -c -o wcmFilter.lo `test -f '$(top_srcdir)/src/wcmFilter.c' || echo '$(srcdir)/'`$(top_srcdir)/src/wcmFilter.c
(-)files/patch-src-wcmConfig.c (-16 lines)
Lines 1-16 Link Here
1
--- src/wcmConfig.c.orig
2
+++ src/wcmConfig.c
3
@@ -373,9 +373,12 @@ wcmDetectDeviceClass(const InputInfoPtr 
4
 		return TRUE;
5
 
6
 	/* Bluetooth is also considered as USB */
7
+#if 0
8
 	if (gWacomISDV4Device.Detect(pInfo))
9
 		common->wcmDevCls = &gWacomISDV4Device;
10
-	else if (gWacomUSBDevice.Detect(pInfo))
11
+	else
12
+#endif
13
+	if (gWacomUSBDevice.Detect(pInfo))
14
 		common->wcmDevCls = &gWacomUSBDevice;
15
 	else
16
 		xf86Msg(X_ERROR, "%s: cannot identify device class.\n", pInfo->name);
(-)files/patch-src-wcmISDV4.c (+123 lines)
Line 0 Link Here
1
--- src/wcmISDV4.c.orig	2013-08-07 16:41:16.844274271 -0700
2
+++ src/wcmISDV4.c	2013-08-07 19:38:52.321272814 -0700
3
@@ -24,11 +24,10 @@
4
 #include "xf86Wacom.h"
5
 #include <xf86_OSproc.h>
6
 #include "wcmFilter.h"
7
-#include <linux/serial.h>
8
 #include "isdv4.h"
9
+#include <termios.h>
10
 #include <unistd.h>
11
 #include <fcntl.h>
12
-#include <libudev.h>
13
 
14
 #define RESET_RELATIVE(ds) do { (ds).relwheel = 0; } while (0)
15
 
16
@@ -192,11 +191,11 @@
17
 
18
 static Bool isdv4Detect(InputInfoPtr pInfo)
19
 {
20
-	struct serial_struct ser;
21
+	struct termios termAttr;
22
 	int rc;
23
 
24
-	rc = ioctl(pInfo->fd, TIOCGSERIAL, &ser);
25
-	if (rc == -1)
26
+	rc = tcgetattr( pInfo->fd, &termAttr );
27
+	if( rc != 0 )
28
 		return FALSE;
29
 
30
 	return TRUE;
31
@@ -935,67 +934,6 @@
32
 };
33
 
34
 /**
35
- * Query the model number from the sysfs /sys/.../device/id file and return
36
- * the matching model and the ID for the model we found.
37
- *
38
- * @param pInfo Used for debugging purposes only.
39
- * @param fd File descriptor to the serial device.
40
- * @param[out] id On success, returns the numeric ID for this device
41
- * according to the model-specific matching pattern.
42
- *
43
- * @return The model description for the matching device or NULL if no
44
- * matching one could be found.
45
- */
46
-static ISDV4ModelDesc*
47
-model_from_sysfs(const InputInfoPtr pInfo, int fd, int *id)
48
-{
49
-	WacomDevicePtr priv = pInfo->private;
50
-	ISDV4ModelDesc* model = NULL;
51
-	struct udev *udev = NULL;
52
-	struct udev_device *device = NULL;
53
-	struct stat st;
54
-	char *sysfs_path = NULL;
55
-	FILE *file = NULL;
56
-
57
-	fstat(fd, &st);
58
-
59
-	udev = udev_new();
60
-	device = udev_device_new_from_devnum(udev, 'c', st.st_rdev);
61
-
62
-	if (!device)
63
-		goto out;
64
-
65
-	if (asprintf(&sysfs_path, "%s/device/id",
66
-		     udev_device_get_syspath(device)) == -1)
67
-		goto out;
68
-
69
-	DBG(8, priv, "sysfs path: %s\n", sysfs_path);
70
-
71
-	file = fopen(sysfs_path, "r");
72
-	if (!file)
73
-		goto out;
74
-
75
-	model = isdv4_models;
76
-
77
-	while(model->pattern && fscanf(file, model->pattern, id) <= 0)
78
-		model++;
79
-
80
-	if (!model->pattern)
81
-		model = NULL;
82
-
83
-	DBG(8, priv, "sysfs check found %s:%d\n",
84
-	    (model) ? model->pattern : "<unknown>", *id);
85
-
86
-out:
87
-	udev_device_unref(device);
88
-	udev_unref(udev);
89
-	if (file)
90
-		fclose(file);
91
-	free(sysfs_path);
92
-	return model;
93
-}
94
-
95
-/**
96
  * Query the device's fd for the key bits and the tablet ID. Returns the ID
97
  * on success. If the model vendor is unknown, we assume a penabled device
98
  * (0x90). If the model vendor is known but the model itself is unknown, the
99
@@ -1010,22 +948,18 @@
100
 {
101
 	int id = 0;
102
 	int tablet_id = 0x90;
103
-	struct serial_struct tmp;
104
+	struct termios tmp;
105
 	WacomDevicePtr  priv = (WacomDevicePtr)pInfo->private;
106
 	WacomCommonPtr  common = priv->common;
107
 	ISDV4ModelDesc *model = isdv4_models;
108
 
109
-	if (ioctl(pInfo->fd, TIOCGSERIAL, &tmp) < 0)
110
+	if( tcgetattr( pInfo->fd, &tmp ) != 0 )
111
 		return 0;
112
 
113
 	/* check device name for ID first */
114
 	while (model->pattern && sscanf(pInfo->name, model->pattern, &id) < 1)
115
 		model++;
116
 
117
-	/* grab id from sysfs/.../device/id */
118
-	if (!model->pattern)
119
-		model = model_from_sysfs(pInfo, pInfo->fd, &id);
120
-
121
 	memset(common->wcmKeys, 0, sizeof(common->wcmKeys));
122
 
123
 	/* default to penabled */
(-)files/patch-tools-Makefile.in (-11 lines)
Lines 1-11 Link Here
1
--- tools/Makefile.in.orig
2
+++ tools/Makefile.in
3
@@ -54,6 +54,6 @@ PRE_UNINSTALL = :
4
 POST_UNINSTALL = :
5
 build_triplet = @build@
6
 host_triplet = @host@
7
-bin_PROGRAMS = xsetwacom$(EXEEXT) isdv4-serial-debugger$(EXEEXT)
8
+bin_PROGRAMS = xsetwacom$(EXEEXT) 
9
 @UNITTESTS_TRUE@check_PROGRAMS = xsetwacom-test$(EXEEXT)
10
 subdir = tools
11
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
(-)files/patch-tools-isdv4-serial-debugger.c (+33 lines)
Line 0 Link Here
1
--- tools/isdv4-serial-debugger.c.orig	2013-08-07 16:41:16.826271564 -0700
2
+++ tools/isdv4-serial-debugger.c	2013-08-07 20:39:14.513272146 -0700
3
@@ -25,7 +25,6 @@
4
 
5
 #include <errno.h>
6
 #include <fcntl.h>
7
-#include <linux/serial.h>
8
 #include <getopt.h>
9
 #include <poll.h>
10
 #include <stdio.h>
11
@@ -71,7 +70,6 @@
12
 static int open_device(char *path)
13
 {
14
 	int fd, rc;
15
-	struct serial_struct ser;
16
 	struct termios t;
17
 
18
 	TRACE("Opening device '%s'.\n", path);
19
@@ -80,14 +78,6 @@
20
 	if (fd < 1)
21
 		perror("Failed to open device file.");
22
 
23
-	if (ioctl(fd, TIOCGSERIAL, &ser) == -1)
24
-	{
25
-		fprintf(stderr, "Not a serial device?");
26
-		close(fd);
27
-		fd = -1;
28
-		goto out;
29
-	}
30
-
31
 	rc = tcgetattr(fd, &t);
32
 	if (rc == -1)
33
 	{
(-)pkg-plist (+1 lines)
Lines 1-5 Link Here
1
bin/xsetwacom
1
bin/xsetwacom
2
%%XINPUTMODDIR%%/wacom_drv.so
2
%%XINPUTMODDIR%%/wacom_drv.so
3
%%XINPUTMODDIR%%/isdv4-serial-debugger
3
@dirrmtry %%XINPUTMODDIR%%
4
@dirrmtry %%XINPUTMODDIR%%
4
@cwd %%KMODDIR%%
5
@cwd %%KMODDIR%%
5
%%UWACOMKLD%%
6
%%UWACOMKLD%%

Return to bug 181133