summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/mxb.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/mxb.c')
-rw-r--r--linux/drivers/media/video/mxb.c18
1 files changed, 11 insertions, 7 deletions
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 )