From: Mark Lord <kernel@teksavvy.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] dvb: fix tuner registration without CONFIG_DVB_NET
Date: Sat, 18 Feb 2012 13:29:29 -0500 [thread overview]
Message-ID: <4F3FEE09.6070502@teksavvy.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
Ever since linux-3.1, my DVB tuners have been non-functional.
This turns out to be due to a bug in with this chunk of code
inside linux/drivers/media/video/videobuf-dvb.c:
/* register network adapter */
dvb_net_init(adapter, &dvb->net, &dvb->demux.dmx);
if (dvb->net.dvbdev == NULL) {
result = -ENOMEM;
goto fail_fe_conn;
}
The problem is, dvb_net_init() doesn't do anything
for the case where CONFIG_DVB_NET is not set.
And the code in videobuf-dvb.c treats this as a fatal error.
The patch below (linux-3.2.6) fixes the regression.
Signed-off-by: Mark Lord <mlord@pobox.com>
---
Patch is also attached to bypass email mangling.
--- linux-3.2.6/drivers/media/video/videobuf-dvb.c 2012-02-13 14:17:29.000000000
-0500
+++ linux/drivers/media/video/videobuf-dvb.c 2012-02-18 13:21:42.422716047 -0500
@@ -226,9 +226,10 @@
}
/* register network adapter */
- dvb_net_init(adapter, &dvb->net, &dvb->demux.dmx);
- if (dvb->net.dvbdev == NULL) {
- result = -ENOMEM;
+ result = dvb_net_init(adapter, &dvb->net, &dvb->demux.dmx);
+ if (result < 0) {
+ printk(KERN_WARNING "%s: dvb_net_init failed (errno = %d)\n",
+ dvb->name, result);
goto fail_fe_conn;
}
return 0;
[-- Attachment #2: 13_linux-3.2_dvb_net_fix.patch --]
[-- Type: text/x-patch, Size: 550 bytes --]
--- linux-3.2.6/drivers/media/video/videobuf-dvb.c 2012-02-13 14:17:29.000000000 -0500
+++ linux/drivers/media/video/videobuf-dvb.c 2012-02-18 13:21:42.422716047 -0500
@@ -226,9 +226,10 @@
}
/* register network adapter */
- dvb_net_init(adapter, &dvb->net, &dvb->demux.dmx);
- if (dvb->net.dvbdev == NULL) {
- result = -ENOMEM;
+ result = dvb_net_init(adapter, &dvb->net, &dvb->demux.dmx);
+ if (result < 0) {
+ printk(KERN_WARNING "%s: dvb_net_init failed (errno = %d)\n",
+ dvb->name, result);
goto fail_fe_conn;
}
return 0;
reply other threads:[~2012-02-18 18:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4F3FEE09.6070502@teksavvy.com \
--to=kernel@teksavvy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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