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

Commit 8986b711 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "HID: uhid: remove custom locking from uhid_hid_open/close"

parents 75ad0e2a 890fc711
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -144,13 +144,11 @@ static int uhid_hid_open(struct hid_device *hid)
	struct uhid_device *uhid = hid->driver_data;
	int retval = 0;

	mutex_lock(&hid->ll_open_lock);
	if (!hid->ll_open_count++) {
		retval = uhid_queue_event(uhid, UHID_OPEN);
		if (retval)
			hid->ll_open_count--;
	}
	mutex_unlock(&hid->ll_open_lock);
	return retval;
}

@@ -158,10 +156,8 @@ static void uhid_hid_close(struct hid_device *hid)
{
	struct uhid_device *uhid = hid->driver_data;

	mutex_lock(&hid->ll_open_lock);
	if (!--hid->ll_open_count)
		uhid_queue_event(uhid, UHID_CLOSE);
	mutex_unlock(&hid->ll_open_lock);
}

static int uhid_hid_parse(struct hid_device *hid)