[PATCH v6 1/3] i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy

2017-12-19 Thread Heiner Kallweit
Currently i2c_new_device and i2c_new_dummy return just NULL in error case although they have more error details internally. Therefore move the functionality into new functions returning detailed errors and add wrappers for compatibilty with the current API. This allows to use these functions with

[PATCH v6 1/3] i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy

2017-12-19 Thread Heiner Kallweit
Currently i2c_new_device and i2c_new_dummy return just NULL in error case although they have more error details internally. Therefore move the functionality into new functions returning detailed errors and add wrappers for compatibilty with the current API. This allows to use these functions with