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: linux-i2c@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 10/17] media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device()
Date: Wed,  6 Nov 2019 22:21:10 +0100	[thread overview]
Message-ID: <20191106212120.27983-11-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20191106212120.27983-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/platform/sti/c8sectpfe/c8sectpfe-dvb.c | 4 ++--
 1 file changed, 2 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..103872266565 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
@@ -170,8 +170,8 @@ 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;
 		}
-- 
2.20.1


WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Patrice Chotard <patrice.chotard@st.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-i2c@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/17] media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device()
Date: Wed,  6 Nov 2019 22:21:10 +0100	[thread overview]
Message-ID: <20191106212120.27983-11-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20191106212120.27983-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/platform/sti/c8sectpfe/c8sectpfe-dvb.c | 4 ++--
 1 file changed, 2 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..103872266565 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
@@ -170,8 +170,8 @@ 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;
 		}
-- 
2.20.1

WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Patrice Chotard <patrice.chotard@st.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-i2c@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/17] media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device()
Date: Wed,  6 Nov 2019 22:21:10 +0100	[thread overview]
Message-ID: <20191106212120.27983-11-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20191106212120.27983-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/platform/sti/c8sectpfe/c8sectpfe-dvb.c | 4 ++--
 1 file changed, 2 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..103872266565 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
@@ -170,8 +170,8 @@ 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;
 		}
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-11-06 21:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 21:21 [PATCH 00/17] media: use new API for creating client devices Wolfram Sang
2019-11-06 21:21 ` Wolfram Sang
2019-11-06 21:21 ` Wolfram Sang
2019-11-06 21:21 ` [PATCH 01/17] i2c: add helper to check if a client has a driver attached Wolfram Sang
2019-12-11  7:59   ` Wolfram Sang
2019-11-06 21:21 ` [PATCH 02/17] media: dvb-core: dvbdev: convert to use i2c_new_client_device() Wolfram Sang
2019-11-06 21:21 ` [PATCH 03/17] media: dvb-frontends: cxd2820r_core: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 04/17] media: dvb-frontends: lgdt330x: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 05/17] media: dvb-frontends: m88ds3103: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 06/17] media: dvb-frontends: ts2020: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 07/17] media: pci: cx23885: cx23885-dvb: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 08/17] media: pci: saa7164: saa7164-dvb: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 09/17] media: pci: smipcie: smipcie-main: " Wolfram Sang
2019-11-06 21:21 ` Wolfram Sang [this message]
2019-11-06 21:21   ` [PATCH 10/17] media: platform: sti: c8sectpfe: c8sectpfe-dvb: " Wolfram Sang
2019-11-06 21:21   ` Wolfram Sang
2019-11-07  9:59   ` Patrice CHOTARD
2019-11-07  9:59     ` Patrice CHOTARD
2019-11-07  9:59     ` Patrice CHOTARD
2019-11-06 21:21 ` [PATCH 11/17] media: usb: dvb-usb-v2: af9035: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 12/17] media: usb: dvb-usb-v2: anysee: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 13/17] media: usb: dvb-usb-v2: rtl28xxu: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 14/17] media: usb: dvb-usb-v2: zd1301: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 15/17] media: usb: dvb-usb: dib0700_devices: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 16/17] media: usb: dvb-usb: dw2102: " Wolfram Sang
2019-11-06 21:21 ` [PATCH 17/17] media: v4l2-core: v4l2-i2c: " 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=20191106212120.27983-11-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=patrice.chotard@st.com \
    /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.