All of lore.kernel.org
 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>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 03/16] media: dvb-frontends: lgdt330x: convert to use i2c_new_client_device()
Date: Mon, 16 Dec 2019 16:51:30 +0100	[thread overview]
Message-ID: <20191216155146.8803-4-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/dvb-frontends/lgdt330x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/lgdt330x.c b/drivers/media/dvb-frontends/lgdt330x.c
index 651c8aa75e17..da3a8c5e18d8 100644
--- a/drivers/media/dvb-frontends/lgdt330x.c
+++ b/drivers/media/dvb-frontends/lgdt330x.c
@@ -922,8 +922,8 @@ struct dvb_frontend *lgdt330x_attach(const struct lgdt330x_config *_config,
 	strscpy(board_info.type, "lgdt330x", sizeof(board_info.type));
 	board_info.addr = demod_address;
 	board_info.platform_data = &config;
-	client = i2c_new_device(i2c, &board_info);
-	if (!client || !client->dev.driver)
+	client = i2c_new_client_device(i2c, &board_info);
+	if (!i2c_client_has_driver(client))
 		return NULL;
 
 	return lgdt330x_get_dvb_frontend(client);
-- 
2.20.1


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

Thread overview: 19+ 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 ` 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 ` Wolfram Sang [this message]
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   ` 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 ` [PATCH RESEND 13/16] media: usb: dvb-usb-v2: zd1301: " Wolfram Sang
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-4-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.