From: Michael Hunold (LinuxTV.org CVS maintainer) <hunold@convergence.de>
To: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
torvalds@osdl.org
Subject: [PATCH 3/6] [DVB] mt312 DVB frontend update
Date: Tue, 29 Jul 2003 11:30:31 +0200 [thread overview]
Message-ID: <10594710311160@convergence.de> (raw)
In-Reply-To: <10594710303674@convergence.de>
[DVB] - show i2c read errors only for registered frontends
diff -uNrwB --new-file linux-2.6.0-test2.work/drivers/media/dvb/frontends/mt312.c linux-2.6.0-test2.patch/drivers/media/dvb/frontends/mt312.c
--- linux-2.6.0-test2.work/drivers/media/dvb/frontends/mt312.c 2003-07-29 09:10:18.000000000 +0200
+++ linux-2.6.0-test2.patch/drivers/media/dvb/frontends/mt312.c 2003-07-29 09:17:53.000000000 +0200
@@ -41,6 +41,9 @@
#define MT312_SYS_CLK 90000000UL /* 90 MHz */
#define MT312_PLL_CLK 10000000UL /* 10 MHz */
+/* number of active frontends */
+static int mt312_count = 0;
+
static struct dvb_frontend_info mt312_info = {
.name = "Zarlink MT312",
.type = FE_QPSK,
@@ -78,7 +81,7 @@
ret = i2c->xfer(i2c, msg, 2);
- if (ret != 2) {
+ if ((ret != 2) && (mt312_count != 0)) {
printk(KERN_ERR "%s: ret == %d\n", __FUNCTION__, ret);
return -EREMOTEIO;
}
@@ -722,13 +725,21 @@
if ((id != ID_VP310) && (id != ID_MT312))
return -ENODEV;
- return dvb_register_frontend(mt312_ioctl, i2c, (void *) (long) id,
- &mt312_info);
+ if ((ret = dvb_register_frontend(mt312_ioctl, i2c,
+ (void *)(long)id, &mt312_info)) < 0)
+ return ret;
+
+ mt312_count++;
+
+ return 0;
}
static void mt312_detach(struct dvb_i2c_bus *i2c)
{
dvb_unregister_frontend(mt312_ioctl, i2c);
+
+ if (mt312_count)
+ mt312_count--;
}
static int __init mt312_module_init(void)
next prev parent reply other threads:[~2003-07-29 9:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-29 9:30 [PATCH 1/6] [DVB] Kconfig and Makefile updates Michael Hunold
2003-07-29 9:30 ` [PATCH 2/6] [DVB] DVB core update Michael Hunold
2003-07-29 9:30 ` Michael Hunold [this message]
2003-07-29 9:30 ` [PATCH 4/6] [DVB] Update MAC handling for various DVB PCI cards Michael Hunold
2003-07-29 9:30 ` [PATCH 5/6] [DVB] TTUSB-DEC driver update Michael Hunold
2003-07-29 9:30 ` [PATCH 6/6] [DVB] Hexium saa7146 " Michael Hunold
2003-07-29 9:58 ` [PATCH 1/6] [DVB] Kconfig and Makefile updates Roman Zippel
2003-07-29 10:02 ` Michael Hunold
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=10594710311160@convergence.de \
--to=hunold@convergence.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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).