Improve error handling for msp3400.c
Hi,
on read/send failure the msp3400 driver is trying three times to recover and is printing a message each time. On a unloaded system this happens at a rate of about 1/min while watching tv and is quite annoying, while non critical. This patchs gets rid of it and instead raises the final error message to KERN_ERR if indeed the communication failed three times in a row.
Thanks,
Jan
Signature · 1 line
Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686
drivers/media/video/msp3400.c +2 -6
@@ -192,13 +192,11 @@if (2 ==i2c_transfer (client->adapter,msgs,2 ))break ; err++; -printk (KERN_WARNING "msp34xx: I/O error #%d (read 0x%02x/0x%02x)\n" , - err, dev, addr); current->state =TASK_INTERRUPTIBLE ;schedule_timeout (HZ /10 ); }if (3 == err) { -printk (KERN_WARNING "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n" ); +printk (KERN_ERR "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n" );msp3400c_reset (client);return -1 ; }
@@ -221,13 +219,11 @@if (5 ==i2c_master_send (client, buffer,5 ))break ; err++; -printk (KERN_WARNING "msp34xx: I/O error #%d (write 0x%02x/0x%02x)\n" , - err, dev, addr); current->state =TASK_INTERRUPTIBLE ;schedule_timeout (HZ /10 ); }if (3 == err) { -printk (KERN_WARNING "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n" ); +printk (KERN_ERR "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n" );msp3400c_reset (client);return -1 ; }