Skip to content

Commit afaa4d0

Browse files
Wolfram Sangdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 07eaf53 commit afaa4d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/sfc/falcon/falcon_boards.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ static int ef4_init_lm87(struct ef4_nic *efx, const struct i2c_board_info *info,
8888
const u8 *reg_values)
8989
{
9090
struct falcon_board *board = falcon_board(efx);
91-
struct i2c_client *client = i2c_new_device(&board->i2c_adap, info);
91+
struct i2c_client *client = i2c_new_client_device(&board->i2c_adap, info);
9292
int rc;
9393

94-
if (!client)
95-
return -EIO;
94+
if (IS_ERR(client))
95+
return PTR_ERR(client);
9696

9797
/* Read-to-clear alarm/interrupt status */
9898
i2c_smbus_read_byte_data(client, LM87_REG_ALARMS1);

0 commit comments

Comments
 (0)