lkml.org 
[lkml]   [2012]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Q] reprobe deferred-probing drivers
On Wed, 17 Oct 2012, Guennadi Liakhovetski wrote:

> Hi
>
> I've got a situation, for which I currently don't have a (good) solution.

Ok, right, would it be acceptable to just do something like

if (dev->parent)
device_lock(dev->parent);
device_release_driver(dev);
device_attach(dev);

?

Thanks
Guennadi

> Let's say device A depends on device B and as long as B hasn't probed, A
> requests deferred probing. Now B probes, which causes A to also succeed
> its probing. Next we want to remove B, say, by unloading its driver. A has
> to go back into "deferred-probing" state. How do we do it? This can be
> achieved by unloading B's driver and loading again. Essentially, we have
> to use the sysfs "unbind" and then the "bind" attributes. But how do we do
> this from the kernel? Shall we export driver_bind() and driver_unbind()?

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/


\
 
 \ /
  Last update: 2012-10-17 11:21    [W:0.102 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site