sfc: falcon: 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:
Wolfram Sang 2020-03-26 22:10:00 +01:00 коммит произвёл David S. Miller
Родитель 07eaf53adb
Коммит afaa4d060f
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -88,11 +88,11 @@ static int ef4_init_lm87(struct ef4_nic *efx, const struct i2c_board_info *info,
const u8 *reg_values) const u8 *reg_values)
{ {
struct falcon_board *board = falcon_board(efx); struct falcon_board *board = falcon_board(efx);
struct i2c_client *client = i2c_new_device(&board->i2c_adap, info); struct i2c_client *client = i2c_new_client_device(&board->i2c_adap, info);
int rc; int rc;
if (!client) if (IS_ERR(client))
return -EIO; return PTR_ERR(client);
/* Read-to-clear alarm/interrupt status */ /* Read-to-clear alarm/interrupt status */
i2c_smbus_read_byte_data(client, LM87_REG_ALARMS1); i2c_smbus_read_byte_data(client, LM87_REG_ALARMS1);