Re: [PATCH 1/2] usb: udc: add usb_udc_vbus_handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 12, 2015 at 01:55:28PM +0200, Alexander Shishkin wrote:
> Peter Chen <peter.chen@xxxxxxxxxxxxx> writes:
> 
> > +	mutex_lock(&udc_lock);
> > +	list_for_each_entry(udc, &udc_list, list)
> > +		if (udc->gadget == gadget)
> > +			goto found;
> > +	mutex_unlock(&udc_lock);
> 
> Not entirely specific to this patchset, but this search pattern is
> copied verbatim in udc-core.c like 5 times. Maybe it makes sense to make
> it a separate function?

yeah, might be better to do that as patch 1 in this series.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux