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

Commit 162914b3 authored by Pratham Pratap's avatar Pratham Pratap Committed by Gerrit - the friendly Code Review server
Browse files

usb: composite: Return status zero if remote wakeup is not supported



Currently composite driver is calling get_status for the function
drivers which supports remote wakeup capability. Instead of this
have another judgement to check whether the device is advertising
remote wakeup capability.

Change-Id: I6e907b2a05ea64e04aa50ee90c4eb53b86b027d4
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent db5f5ed6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1899,7 +1899,11 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
		f = cdev->config->interface[intf];
		if (!f)
			break;

		if (USB_CONFIG_ATT_WAKEUP & cdev->config->bmAttributes)
			status = f->get_status ? f->get_status(f) : 0;
		else
			status = 0;
		if (status < 0)
			break;
		put_unaligned_le16(status & 0x0000ffff, req->buf);