Messages in this thread | | | Date | Mon, 8 Jul 2013 18:33:45 -0500 | From | Scott Wood <> | Subject | Re: [linuxppc-dev] Unbinding device from a driver |
| |
On 07/04/2013 05:35:28 AM, Gupta Ruchika-R66431 wrote: > Hi, > > > > I am trying to unbind a platform device from a driver. Even when the > remove function of the device returns an EBUSY error, the device is > unbound from the driver. Is this the right behavior ? Why does kernel > forcefully unbind the device even if device remove function returns > an error ?
From looking at the code, it seems it's not allowed for a driver to refuse the unbinding. If you can't unbind yet, you need to block until you can (and take measures to ensure that it won't take too long).
I don't know the history of why the remove method can return an error even though nothing seems to check it.
> root@p4080ds: ls > > bind ffe301000.jr ffe302000.jr ffe303000.jr ffe304000.jr uevent > unbind > > > > root@p4080ds: echo ffe301000.jr > unbind > > In caam_jr_remove > > caam_jr ffe301000.jr: Device Busy
Is the caam_jr driver printing this, or the device model infrastructure?
-Scott
| |