Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1d7b7c1 authored by Martin Kepplinger's avatar Martin Kepplinger Committed by Dmitry Torokhov
Browse files

Input: pegasus_notetaker - set device mode in reset_resume() if in use

parent f32f5394
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -410,7 +410,19 @@ static int pegasus_resume(struct usb_interface *intf)

static int pegasus_reset_resume(struct usb_interface *intf)
{
	return pegasus_resume(intf);
	struct pegasus *pegasus = usb_get_intfdata(intf);
	int retval = 0;

	mutex_lock(&pegasus->dev->mutex);
	if (pegasus->dev->users) {
		retval = pegasus_set_mode(pegasus, PEN_MODE_XY,
					  NOTETAKER_LED_MOUSE);
		if (!retval && usb_submit_urb(pegasus->irq, GFP_NOIO) < 0)
			retval = -EIO;
	}
	mutex_unlock(&pegasus->dev->mutex);

	return retval;
}

static const struct usb_device_id pegasus_ids[] = {