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

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
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;