[PATCH v4 3/4] USB: Gadget: Add Samsung S3C24XX USB High-Speed controller driver

Alan Stern stern at rowland.harvard.edu
Thu Apr 14 13:15:23 EDT 2011


On Thu, 14 Apr 2011, Greg KH wrote:

> On Thu, Apr 14, 2011 at 11:35:43AM -0400, Alan Stern wrote:
> > On Thu, 14 Apr 2011, Heiko [iso-8859-1] St?bner wrote:
> > 
> > > From: Thomas Abraham <thomas.ab at samsung.com>
> > > 
> > > The Samsung's S3C2416, S3C2443 and S3C2450 includes a USB High-Speed
> > > device controller module. This driver enables support for USB high-speed
> > > gadget functionality for the Samsung S3C24xx SoC's that include this
> > > controller.
> > > 
> > > Signed-off-by: Thomas Abraham <thomas.ab at samsung.com>
> > > Signed-off-by: Sangbeom Kim <sbkim73 at samsung.com>
> > > Signed-off-by: Kukjin Kim <kgene.kim at samsung.com>
> > > Signed-off-by: Alexander Neumann <alexander at bumpern.de>
> > > Signed-off-by: Heiko Stuebner <heiko at sntech.de>
> > 
> > ...
> > 
> > > +static struct usb_ep_ops s3c_hsudc_ep_ops = {
> > > +	.enable = s3c_hsudc_ep_enable,
> > > +	.disable = s3c_hsudc_ep_disable,
> > > +	.alloc_request = s3c_hsudc_alloc_request,
> > > +	.free_request = s3c_hsudc_free_request,
> > > +	.queue = s3c_hsudc_queue,
> > > +	.dequeue = s3c_hsudc_dequeue,
> > > +	.set_halt = s3c_hsudc_set_halt,
> > > +};
> > 
> > There's no .set_wedge method.  Why do people always leave this out?
> 
> Does the code spit out a nasty warning if this isn't set?  If not, I
> would suggest adding it so that this doesn't keep happening.
> 
> Or just refuse to be able to register the structure, that would stop it
> right away :)

In fact, set_wedge is optional.  But it's so easy to implement, there's 
no good reason for leaving it out.

I suspect what's happening is that people are just basing their new 
drivers on other drivers from very old kernel versions, before 
set_wedge was added.

Alan Stern




More information about the linux-arm-kernel mailing list