Alex, Can you resend with git-send-email? Also, please be sure to use the same style as the rest of the file, or the RTEMS Style rules otherwise. In particular, use { on same line as if, and spaces around ().
Other than style, I think this looks ok. Gedare On Wed, Apr 1, 2015 at 10:31 AM, Alexandru-Sever Horin <alex.seve...@gmail.com> wrote: > Hello, > > I am currently working on a project which uses I2C devices through libi2c > API. > > The problem that I am facing is that this function: > rtems_libi2c_register_drv actually registeres the device before > drvtbl->ops->initialization_entry returns success or failure. This means > that it is impossible to probe a device which might be at 2 different I2C > addreses on different PCB revisions. > > For a device driver with no initialization function it should make no > difference, the function call being ignored, and the minor being returned. > If the device driver has a initialization function, it calls it and makes > sure that the return value is 0 before registering the name. If it returns > something different than RTEMS_SUCCESS, it makes sure the driver > registration returns negative error code (so it's not mistaken with minor > number), and does not register the device driver. > > I have attached a patch to solve this problem, and bypass device > registration in the filesystem if the initialziation fails. > Please review the changes and merge if you agree. > > Thank you, > Alex H. > > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel