diff mbox

[0000/0003] full power management for usb touchscreens

Message ID 201006091836.14136.oliver@neukum.org (mailing list archive)
State New, archived
Headers show

Commit Message

Oliver Neukum June 9, 2010, 4:36 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 421f168..d13517a 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -1333,7 +1333,7 @@  static int usbtouch_resume(struct usb_interface *intf)
 	int result = 0;
 	
 	mutex_lock(&input->mutex);
-	if (input->users)
+	if (input->users || usbtouch->type->irq_always)
 		result = usb_submit_urb(usbtouch->irq, GFP_NOIO);
 	mutex_unlock(&input->mutex);
 	return result;
@@ -1484,7 +1484,7 @@  static int usbtouch_probe(struct usb_interface *intf,
 	usbtouch->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 
 	/* device specific allocations */
-	if (type->init) {
+	if (type->alloc) {
 		err = type->alloc(usbtouch);
 		if (err) {
 			dbg("%s - type->alloc() failed, err: %d", __func__, err);