All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: Antti Palosaari <crope@iki.fi>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tomasz Maciej Nowak <tmn505@gmail.com>,
	Sean Young <sean@mess.org>, Gon Solo <gonsolo@gmail.com>,
	Andreas Kemnade <andreas@kemnade.info>,
	linux-media@vger.kernel.org
Subject: [PATCH 1/2] media: usb: dvb-usb-v2: af9035: report if i2c client isn't bound
Date: Sat, 12 Jun 2021 11:13:50 +0200	[thread overview]
Message-ID: <20210612091351.7169-1-uwe@kleine-koenig.org> (raw)

If a sub device doesn't immediately bind after it was added, emit an
error indication to the kernel log to help debugging. This happens for
example if the needed driver isn't available at all.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 drivers/media/usb/dvb-usb-v2/af9035.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index 22fda53e219a..6b7db903a365 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -210,6 +210,7 @@ static int af9035_add_i2c_dev(struct dvb_usb_device *d, const char *type,
 	/* register I2C device */
 	client = i2c_new_client_device(adapter, &board_info);
 	if (!i2c_client_has_driver(client)) {
+		dev_err(&intf->dev, "failed to bind i2c device to %s driver\n", type);
 		ret = -ENODEV;
 		goto err;
 	}
-- 
2.30.2


             reply	other threads:[~2021-06-12  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  9:13 Uwe Kleine-König [this message]
2021-06-12  9:13 ` [PATCH 2/2] media: usb: dvb-usb-v2: af9035: let subdrv autoselect enable si2168 and si2157 Uwe Kleine-König

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=20210612091351.7169-1-uwe@kleine-koenig.org \
    --to=uwe@kleine-koenig.org \
    --cc=andreas@kemnade.info \
    --cc=crope@iki.fi \
    --cc=gonsolo@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sean@mess.org \
    --cc=tmn505@gmail.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.