History

i2c: replace i2c_new_secondary_device with an ERR_PTR variant

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.

Wolfram Sang committed 7 years ago

Commit af805591 parent bbeb6b65 files · +30 −28Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/i2c.h+1−1
@@ -473,7 +473,7 @@ extern struct i2c_client * · 472 unmodified lines
473devm_i2c_new_dummy_device(struct device *dev, struct i2c_adapter *adap, u16 address);473devm_i2c_new_dummy_device(struct device *dev, struct i2c_adapter *adap, u16 address);
474 474
475extern struct i2c_client *475extern struct i2c_client *
476i2c_new_secondary_device(struct i2c_client *client,476i2c_new_ancillary_device(struct i2c_client *client,
477 const char *name,477 const char *name,
478 u16 default_addr);478 u16 default_addr);
479 479

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t