linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-media@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Antti Palosaari <crope@iki.fi>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 13/16] media: usb: dvb-usb-v2: zd1301: convert to use i2c_new_client_device()
Date: Mon, 16 Dec 2019 16:51:40 +0100	[thread overview]
Message-ID: <20191216155146.8803-14-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20191216155146.8803-1-wsa+renesas@sang-engineering.com>

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>
---
 drivers/media/usb/dvb-usb-v2/zd1301.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/zd1301.c b/drivers/media/usb/dvb-usb-v2/zd1301.c
index 63b66b207b64..ba2c1b0d3989 100644
--- a/drivers/media/usb/dvb-usb-v2/zd1301.c
+++ b/drivers/media/usb/dvb-usb-v2/zd1301.c
@@ -172,8 +172,8 @@ static int zd1301_frontend_attach(struct dvb_usb_adapter *adap)
 	board_info.addr = 0x60;
 	board_info.platform_data = &dev->mt2060_pdata;
 	request_module("%s", "mt2060");
-	client = i2c_new_device(adapter, &board_info);
-	if (!client || !client->dev.driver) {
+	client = i2c_new_client_device(adapter, &board_info);
+	if (!i2c_client_has_driver(client)) {
 		ret = -ENODEV;
 		goto err_module_put_demod;
 	}
-- 
2.20.1


  parent reply	other threads:[~2019-12-16 15:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 15:51 [PATCH RESEND 00/16] media: use new API for creating client devices Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 01/16] media: dvb-core: dvbdev: convert to use i2c_new_client_device() Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 02/16] media: dvb-frontends: cxd2820r_core: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 03/16] media: dvb-frontends: lgdt330x: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 04/16] media: dvb-frontends: m88ds3103: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 05/16] media: dvb-frontends: ts2020: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 06/16] media: pci: cx23885: cx23885-dvb: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 07/16] media: pci: saa7164: saa7164-dvb: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 08/16] media: pci: smipcie: smipcie-main: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 09/16] media: platform: sti: c8sectpfe: c8sectpfe-dvb: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 10/16] media: usb: dvb-usb-v2: af9035: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 11/16] media: usb: dvb-usb-v2: anysee: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 12/16] media: usb: dvb-usb-v2: rtl28xxu: " Wolfram Sang
2019-12-16 15:51 ` Wolfram Sang [this message]
2019-12-16 15:51 ` [PATCH RESEND 14/16] media: usb: dvb-usb: dib0700_devices: " Wolfram Sang
2019-12-16 15:51 ` [PATCH RESEND 15/16] media: usb: dvb-usb: dw2102: " Wolfram Sang
2019-12-16 15:51 ` [PATCH V2 16/16] media: v4l2-core: v4l2-i2c: convert to new API with ERRPTR Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191216155146.8803-14-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=crope@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).