Commit 07eaf53a authored by Wolfram Sang's avatar Wolfram Sang Committed by David S. Miller

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent adde5565
...@@ -198,11 +198,11 @@ int igb_sysfs_init(struct igb_adapter *adapter) ...@@ -198,11 +198,11 @@ int igb_sysfs_init(struct igb_adapter *adapter)
} }
/* init i2c_client */ /* init i2c_client */
client = i2c_new_device(&adapter->i2c_adap, &i350_sensor_info); client = i2c_new_client_device(&adapter->i2c_adap, &i350_sensor_info);
if (client == NULL) { if (IS_ERR(client)) {
dev_info(&adapter->pdev->dev, dev_info(&adapter->pdev->dev,
"Failed to create new i2c device.\n"); "Failed to create new i2c device.\n");
rc = -ENODEV; rc = PTR_ERR(client);
goto exit; goto exit;
} }
adapter->i2c_client = client; adapter->i2c_client = client;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment