aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <[email protected]>2019-12-16 16:51:36 +0100
committerMauro Carvalho Chehab <[email protected]>2020-01-09 16:03:20 +0100
commita7070891f9707cd46e761e32b13795e4583796b4 (patch)
tree2efdc61247d370d6716352c3b66921f0ec4d296a
parent32dc63f6915d7a3b80fbe7f2c93582ec12a7ae61 (diff)
media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device()
Use the newer API returning an ERRPTR and use the new helper to bail out. Reviewed-by: Patrice Chotard <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r--drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
index a79250a7f812..0560a9cb004b 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
@@ -170,8 +170,9 @@ int c8sectpfe_frontend_attach(struct dvb_frontend **fe,
/* attach tuner */
request_module("tda18212");
- client = i2c_new_device(tsin->i2c_adapter, &tda18212_info);
- if (!client || !client->dev.driver) {
+ client = i2c_new_client_device(tsin->i2c_adapter,
+ &tda18212_info);
+ if (!i2c_client_has_driver(client)) {
dvb_frontend_detach(*fe);
return -ENODEV;
}