mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
igb: convert to use i2c_new_client_device()
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
adde556552
commit
07eaf53adb
1 changed files with 3 additions and 3 deletions
|
@ -198,11 +198,11 @@ int igb_sysfs_init(struct igb_adapter *adapter)
|
|||
}
|
||||
|
||||
/* init i2c_client */
|
||||
client = i2c_new_device(&adapter->i2c_adap, &i350_sensor_info);
|
||||
if (client == NULL) {
|
||||
client = i2c_new_client_device(&adapter->i2c_adap, &i350_sensor_info);
|
||||
if (IS_ERR(client)) {
|
||||
dev_info(&adapter->pdev->dev,
|
||||
"Failed to create new i2c device.\n");
|
||||
rc = -ENODEV;
|
||||
rc = PTR_ERR(client);
|
||||
goto exit;
|
||||
}
|
||||
adapter->i2c_client = client;
|
||||
|
|
Loading…
Add table
Reference in a new issue