[PATCH v2 2/3] i2c: core: add device-managed version of i2c_new_dummy

2017-12-06 Thread Heiner Kallweit
i2c_new_dummy is typically called from the probe function of the driver for the primary i2c client. It requires calls to i2c_unregister_device in the error path of the probe function and in the remove function. This can be simplified by introducing a device-managed version. Note the changed error

[PATCH v2 2/3] i2c: core: add device-managed version of i2c_new_dummy

2017-12-06 Thread Heiner Kallweit
i2c_new_dummy is typically called from the probe function of the driver for the primary i2c client. It requires calls to i2c_unregister_device in the error path of the probe function and in the remove function. This can be simplified by introducing a device-managed version. Note the changed error