summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-05-27 16:49:14 +0100
committerRichard Hughes <richard@hughsie.com>2015-05-27 16:49:14 +0100
commit78b4d9afba032faec3afbf05068db81dbba99372 (patch)
tree6b2b45be7dfe0f74fede189936e64de3cea700f7
parent099e42f7422780cf6a15e482df8e3b77ab6f77d7 (diff)
downloadcolord-78b4d9afba032faec3afbf05068db81dbba99372.tar.gz
trivial: Unbind the device from the kernel driver
-rw-r--r--lib/colorhug/ch-device.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/colorhug/ch-device.c b/lib/colorhug/ch-device.c
index e16f21d..e972c07 100644
--- a/lib/colorhug/ch-device.c
+++ b/lib/colorhug/ch-device.c
@@ -62,14 +62,11 @@ ch_device_open (GUsbDevice *device, GError **error)
return FALSE;
if (!g_usb_device_set_configuration (device, CH_USB_CONFIG, error))
return FALSE;
-
- if (g_usb_device_get_pid (device) != CH_USB_PID_FIRMWARE_ALS_SENSOR_HID) {
- if (!g_usb_device_claim_interface (device,
- CH_USB_INTERFACE,
- G_USB_DEVICE_CLAIM_INTERFACE_BIND_KERNEL_DRIVER,
- error))
- return FALSE;
- }
+ if (!g_usb_device_claim_interface (device,
+ CH_USB_INTERFACE,
+ G_USB_DEVICE_CLAIM_INTERFACE_BIND_KERNEL_DRIVER,
+ error))
+ return FALSE;
return TRUE;
}