[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140320160328.GB18120@kroah.com>
Date: Thu, 20 Mar 2014 09:03:28 -0700
From: Greg KH <gregkh@...uxfoundation.org>
To: Suresh Gupta <suresh.gupta@...escale.com>
Cc: balbi@...com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] USB: Gadget: fsl driver pullup fix
On Fri, Mar 21, 2014 at 01:57:18AM +0530, Suresh Gupta wrote:
> This fix the fsl usb gadget driver in a way that the usb device
> will be only "pulled up" on requests only when vbus is powered
>
> Signed-off-by: Suresh Gupta <suresh.gupta@...escale.com>
> ---
> Changes from previous version:
> * Removed re-factored code, Will send another patch for re-factoring
> duplicated code
> * Changed Description
>
> drivers/usb/gadget/fsl_udc_core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
> index 35cb972..49d66779 100644
> --- a/drivers/usb/gadget/fsl_udc_core.c
> +++ b/drivers/usb/gadget/fsl_udc_core.c
> @@ -1219,6 +1219,10 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on)
> struct fsl_udc *udc;
>
> udc = container_of(gadget, struct fsl_udc, gadget);
> +
> + if(!udc->vbus_active)
> + return -EOPNOTSUPP;
Always run your patches through scripts/checkpatch.pl so they don't get
rejected for silly things like the wrong coding style...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists