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

media: dvb-frontends: ts2020: convert to use i2c_new_client_device()

Use the newer API returning an ERRPTR and use the new helper to bail
out.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Wolfram Sang and committed by
Mauro Carvalho Chehab
2f507ffa aace5926

+2 -2
+2 -2
drivers/media/dvb-frontends/ts2020.c
··· 519 519 strscpy(board_info.type, "ts2020", I2C_NAME_SIZE); 520 520 board_info.addr = config->tuner_address; 521 521 board_info.platform_data = &pdata; 522 - client = i2c_new_device(i2c, &board_info); 523 - if (!client || !client->dev.driver) 522 + client = i2c_new_client_device(i2c, &board_info); 523 + if (!i2c_client_has_driver(client)) 524 524 return NULL; 525 525 526 526 return fe;