summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/dpc7146.c7
-rw-r--r--linux/drivers/media/video/mxb.c18
2 files changed, 16 insertions, 9 deletions
diff --git a/linux/drivers/media/video/dpc7146.c b/linux/drivers/media/video/dpc7146.c
index 2d0b45e9a..ee2eb280f 100644
--- a/linux/drivers/media/video/dpc7146.c
+++ b/linux/drivers/media/video/dpc7146.c
@@ -19,8 +19,8 @@
*/
#define DEBUG_VARIABLE debug
-#include "saa7146_vv.h"
+#include <media/saa7146_vv.h>
#include <linux/video_decoder.h> /* for saa7111a */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
@@ -117,7 +117,10 @@ static int dpc_probe(struct saa7146_dev* dev)
}
/* loop through all i2c-devices on the bus and look who is there */
- for(i = 0; i < dpc->i2c_adapter.client_count; i++) {
+ for(i = 0; i < I2C_CLIENT_MAX; i++) {
+ if( NULL == dpc->i2c_adapter.clients[i] ) {
+ continue;
+ }
if( I2C_SAA7111A == dpc->i2c_adapter.clients[i]->addr )
dpc->saa7111a = dpc->i2c_adapter.clients[i];
}
diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c
index c9fe808d2..c5a5e6921 100644
--- a/linux/drivers/media/video/mxb.c
+++ b/linux/drivers/media/video/mxb.c
@@ -22,19 +22,20 @@
*/
#define DEBUG_VARIABLE debug
-#include "saa7146_vv.h"
-#include "mxb.h"
-#include "tea6415c.h"
-#include "tea6420.h"
-#include "tda9840.h"
-#include "tuner.h"
+#include <media/saa7146_vv.h>
#include <linux/video_decoder.h> /* for saa7111a */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
#define KBUILD_MODNAME mxb
#endif
+#include "mxb.h"
+#include "tea6415c.h"
+#include "tea6420.h"
+#include "tda9840.h"
+#include <media/tuner.h>
+
#define I2C_SAA7111A 0x24
/* All unused bytes are reserverd. */
@@ -231,7 +232,10 @@ static int mxb_probe(struct saa7146_dev* dev)
}
/* loop through all i2c-devices on the bus and look who is there */
- for(i = 0; i < mxb->i2c_adapter.client_count; i++) {
+ for(i = 0; i < I2C_CLIENT_MAX; i++) {
+ if( NULL == mxb->i2c_adapter.clients[i] ) {
+ continue;
+ }
if( I2C_TEA6420_1 == mxb->i2c_adapter.clients[i]->addr )
mxb->tea6420_1 = mxb->i2c_adapter.clients[i];
if( I2C_TEA6420_2 == mxb->i2c_adapter.clients[i]->addr )