blob: 77db151e5ed955d6fa85b4266506b80947afee8f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- src/xf86Wacom.c.orig 2015-10-23 17:26:33 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)
|