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

media: dvb-frontends: m88ds3103: 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
aace5926 4f7f5e03

+2 -2
+2 -2
drivers/media/dvb-frontends/m88ds3103.c
··· 1277 1277 strscpy(board_info.type, "m88ds3103", I2C_NAME_SIZE); 1278 1278 board_info.addr = cfg->i2c_addr; 1279 1279 board_info.platform_data = &pdata; 1280 - client = i2c_new_device(i2c, &board_info); 1281 - if (!client || !client->dev.driver) 1280 + client = i2c_new_client_device(i2c, &board_info); 1281 + if (!i2c_client_has_driver(client)) 1282 1282 return NULL; 1283 1283 1284 1284 *tuner_i2c_adapter = pdata.get_i2c_adapter(client);