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

Commit ff458c4f authored by Anson Jacob's avatar Anson Jacob Committed by Greg Hackmann
Browse files

ANDROID: usb: gadget: function: cleanup: Add blank line after declaration



Fix warning generated by checkpatch.pl:
Missing a blank line after declarations

Change-Id: Id129bb8cc8fa37c67a647e2e5996bb2817020e65
Signed-off-by: default avatarAnson Jacob <ansonjacob.aj@gmail.com>
parent 6dc8c51a
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -211,6 +211,7 @@ static inline struct acc_dev *func_to_dev(struct usb_function *f)
static struct usb_request *acc_request_new(struct usb_ep *ep, int buffer_size)
static struct usb_request *acc_request_new(struct usb_ep *ep, int buffer_size)
{
{
	struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL);
	struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL);

	if (!req)
	if (!req)
		return NULL;
		return NULL;


@@ -1021,6 +1022,7 @@ acc_function_unbind(struct usb_configuration *c, struct usb_function *f)
static void acc_start_work(struct work_struct *data)
static void acc_start_work(struct work_struct *data)
{
{
	char *envp[2] = { "ACCESSORY=START", NULL };
	char *envp[2] = { "ACCESSORY=START", NULL };

	kobject_uevent_env(&acc_device.this_device->kobj, KOBJ_CHANGE, envp);
	kobject_uevent_env(&acc_device.this_device->kobj, KOBJ_CHANGE, envp);
}
}


+1 −0
Original line number Original line Diff line number Diff line
@@ -310,6 +310,7 @@ static struct device_attribute *audio_source_function_attributes[] = {
static struct usb_request *audio_request_new(struct usb_ep *ep, int buffer_size)
static struct usb_request *audio_request_new(struct usb_ep *ep, int buffer_size)
{
{
	struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL);
	struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL);

	if (!req)
	if (!req)
		return NULL;
		return NULL;


+4 −0
Original line number Original line Diff line number Diff line
@@ -361,6 +361,7 @@ static inline struct mtp_dev *func_to_mtp(struct usb_function *f)
static struct usb_request *mtp_request_new(struct usb_ep *ep, int buffer_size)
static struct usb_request *mtp_request_new(struct usb_ep *ep, int buffer_size)
{
{
	struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL);
	struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL);

	if (!req)
	if (!req)
		return NULL;
		return NULL;


@@ -1121,6 +1122,7 @@ static int mtp_ctrlrequest(struct usb_composite_dev *cdev,
		} else if (ctrl->bRequest == MTP_REQ_GET_DEVICE_STATUS
		} else if (ctrl->bRequest == MTP_REQ_GET_DEVICE_STATUS
				&& w_index == 0 && w_value == 0) {
				&& w_index == 0 && w_value == 0) {
			struct mtp_device_status *status = cdev->req->buf;
			struct mtp_device_status *status = cdev->req->buf;

			status->wLength =
			status->wLength =
				__constant_cpu_to_le16(sizeof(*status));
				__constant_cpu_to_le16(sizeof(*status));


@@ -1143,6 +1145,7 @@ static int mtp_ctrlrequest(struct usb_composite_dev *cdev,
	/* respond with data transfer or status phase? */
	/* respond with data transfer or status phase? */
	if (value >= 0) {
	if (value >= 0) {
		int rc;
		int rc;

		cdev->req->zero = value < w_length;
		cdev->req->zero = value < w_length;
		cdev->req->length = value;
		cdev->req->length = value;
		rc = usb_ep_queue(cdev->gadget->ep0, cdev->req, GFP_ATOMIC);
		rc = usb_ep_queue(cdev->gadget->ep0, cdev->req, GFP_ATOMIC);
@@ -1378,6 +1381,7 @@ static struct mtp_instance *to_mtp_instance(struct config_item *item)
static void mtp_attr_release(struct config_item *item)
static void mtp_attr_release(struct config_item *item)
{
{
	struct mtp_instance *fi_mtp = to_mtp_instance(item);
	struct mtp_instance *fi_mtp = to_mtp_instance(item);

	usb_put_function_instance(&fi_mtp->func_inst);
	usb_put_function_instance(&fi_mtp->func_inst);
}
}