Re: [PATCH] drivers: usb: udc-core: add deferred bind for gadget driver

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

 



Hi,

On Thu, Feb 20, 2014 at 07:30:13AM +0100, Robert Baldyga wrote:
> This patch adds support for deferred gadget driver bind as a remedy
> for situation when UDC drivers and gadget drivers are builded into
> the kernel, and gadget driver is loaded as first.
> 
> Till now, it that case gadget driver loading failed with "No such device"
> and gadget driver didn't start.
> 
> Now gadget drivers are added to driver_list and binded later, when UDC
> drivers will register in udc-core.

this can be dangerous. If you lsmod you'll still see g_ether loaded but
not bound to anything. If you're on a system where there really isn't a
gadget controller (and dummy isn't enabled) then you really want to
return -ENODEV.

> It needed to modify gadget drivers, because now gadget binding is performed
> asynchronously, and functions used during this process can not be marked
> as __init. For that this patch removes __init marking from every function
> which may be called after module init function return.

you never return -EPROBE_DEFER anywhere, what am I missing ?

-- 
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