31_i2c
diff -u linux-2.4.24-rc1/drivers/media/video/msp3400.c linux/drivers/media/video/msp3400.c
--- linux-2.4.24-rc1/drivers/media/video/msp3400.c	2004-01-07 13:45:57.000000000 +0100
+++ linux/drivers/media/video/msp3400.c	2004-01-07 13:53:10.000000000 +0100
@@ -191,7 +191,7 @@
 		err++;
 		printk(KERN_WARNING "msp34xx: I/O error #%d (read 0x%02x/0x%02x)\n",
 		       err, dev, addr);
-		current->state = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(HZ/10);
 	}
 	if (3 == err) {
@@ -220,7 +220,7 @@
 		err++;
 		printk(KERN_WARNING "msp34xx: I/O error #%d (write 0x%02x/0x%02x)\n",
 		       err, dev, addr);
-		current->state = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(HZ/10);
 	}
 	if (3 == err) {
@@ -803,7 +803,7 @@
 		}
 
 		/* some time for the tuner to sync */
-		current->state   = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(HZ/5);
 		if (signal_pending(current))
 			goto done;
@@ -838,7 +838,7 @@
 		for (this = 0; this < count; this++) {
 			msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo);
 
-			current->state   = TASK_INTERRUPTIBLE;
+			set_current_state(TASK_INTERRUPTIBLE);
 			schedule_timeout(HZ/10);
 			if (signal_pending(current))
 				goto done;
@@ -875,7 +875,7 @@
 		for (this = 0; this < count; this++) {
 			msp3400c_setcarrier(client, cd[this].cdo,cd[this].cdo);
 
-			current->state   = TASK_INTERRUPTIBLE;
+			set_current_state(TASK_INTERRUPTIBLE);
 			schedule_timeout(HZ/10);
 			if (signal_pending(current))
 				goto done;
@@ -1053,7 +1053,7 @@
 		}
 	
 		/* some time for the tuner to sync */
-		current->state   = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(HZ/5);
 		if (signal_pending(current))
 			goto done;
@@ -1114,7 +1114,7 @@
 		} else {
 			/* triggered autodetect */
 			for (;;) {
-				current->state   = TASK_INTERRUPTIBLE;
+				set_current_state(TASK_INTERRUPTIBLE);
 				schedule_timeout(HZ/10);
 				if (signal_pending(current))
 					goto done;
@@ -1205,6 +1205,8 @@
 #endif
 			break;
 		case 0x0003:
+		case 0x0004:
+		case 0x0005:
 			msp->mode   = MSP_MODE_FM_TERRA;
 			msp->stereo = VIDEO_SOUND_MONO;
 			msp->nicam_on = 0;
@@ -1318,9 +1320,9 @@
 #endif
 	msp3400c_setvolume(c,msp->muted,msp->left,msp->right);
 
-	sprintf(c->name,"MSP34%02d%c-%c%d",
-		(msp->rev2>>8)&0xff, (msp->rev1&0xff)+'@',
-		((msp->rev1>>8)&0xff)+'@', msp->rev2&0x1f);
+	snprintf(c->name, sizeof(c->name), "MSP34%02d%c-%c%d",
+		 (msp->rev2>>8)&0xff, (msp->rev1&0xff)+'@',
+		 ((msp->rev1>>8)&0xff)+'@', msp->rev2&0x1f);
 
 	if (simple == -1) {
 		/* default mode */
