Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wolfram Sang and committed by
David S. Miller
07eaf53a adde5565

+3 -3
+3 -3
drivers/net/ethernet/intel/igb/igb_hwmon.c
··· 198 198 } 199 199 200 200 /* init i2c_client */ 201 - client = i2c_new_device(&adapter->i2c_adap, &i350_sensor_info); 202 - if (client == NULL) { 201 + client = i2c_new_client_device(&adapter->i2c_adap, &i350_sensor_info); 202 + if (IS_ERR(client)) { 203 203 dev_info(&adapter->pdev->dev, 204 204 "Failed to create new i2c device.\n"); 205 - rc = -ENODEV; 205 + rc = PTR_ERR(client); 206 206 goto exit; 207 207 } 208 208 adapter->i2c_client = client;