blob: 94b650a46fdddc745412fd0b68695721e5c7abd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- src/xf86Wacom.c.orig 2017-02-24 04:04:55 UTC
+++ src/xf86Wacom.c
@@ -667,6 +667,17 @@ void wcmReadPacket(InputInfoPtr pInfo)
if (len <= 0)
{
+ /* BSD specific code. */
+ /* Hotplug code does not send remove dev notify because
+ * opened cuse dev cant be removed. */
+ if (priv->isParent && errno == EINVAL) {
+ WacomDevicePtr other;
+ for (other = common->wcmDevices; other; other = other->next) {
+ xf86Msg(X_INFO, "%s: removing automatically added device.\n",
+ other->pInfo->name);
+ DeleteInputDeviceRequest(other->pInfo->dev);
+ }
+ } else
/* for all other errors, hope that the hotplugging code will
* remove the device */
if (errno != EAGAIN && errno != EINTR)
|