[U-Boot] [Driver Model] post_bind() and pre_unbind() handler

Masahiro Yamada yamada.m at jp.panasonic.com
Tue Dec 2 06:31:51 CET 2014


Hi Simon,


I have a question about handlers of struct uclass_driver.


When binding a device,
 "uc->uc_drv->post_bind()"  is called *before*  "drv->bind()",
so  the name "pre_bind()" is more suitable than "post_bind()", isn't it?


Likewise, when unbinding a device,
"uc->uc_drv->pre_unbind()" is called *after*  "drv->unbind()"
so  the name "post_unbind()" is more suitable than "pre_unbind()".



I think  pre_  and post_  is opposite here, and it looks confusing to me.

Am I misunderstanding something?



Best Regards
Masahiro Yamada



More information about the U-Boot mailing list