lkml.org 
[lkml]   [2003]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/6] [DVB] mt312 DVB frontend update
Date
From
[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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.049 / U:3.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site