In the general move to have i2c_new_*_device functions which return ERR_PTR instead of NULL, this patch converts i2c_new_secondary_device(). There are only few users, so this patch converts the I2C core and all users in one go. The function gets renamed to i2c_new_ancillary_device() so out-of-tree users will get a build failure to understand they need to adapt their error checking code.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -473,7 +473,7 @@ extern struct i2c_client * · 472 unmodified lines | ||
| 473 | 473 | devm_i2c_new_dummy_device(struct device *dev, struct i2c_adapter *adap, u16 address); |
| 474 | 474 | |
| 475 | 475 | extern struct i2c_client * |
| 476 | −i2c_new_secondary_device(struct i2c_client *client, | |
| 476 | +i2c_new_ancillary_device(struct i2c_client *client, | |
| 477 | 477 | const char *name, |
| 478 | 478 | u16 default_addr); |
| 479 | 479 | |