diff mbox

gspca m5602: eliminate sparse warnings

Message ID 4B22BAB0.5070604@freemail.hu (mailing list archive)
State Rejected
Headers show

Commit Message

Németh Márton Dec. 11, 2009, 9:33 p.m. UTC
None
diff mbox

Patch

diff -r f5662ce08663 linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
--- a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c	Fri Dec 11 09:53:41 2009 +0100
+++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c	Fri Dec 11 22:25:50 2009 +0100
@@ -527,7 +527,7 @@ 
 	err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
 	if (err < 0)
 		return err;
-	data = (data & 0xfe) | !val;
+	data = (data & 0xfe) | (val ? 0 : 1);
 	err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
 	return err;
 }
@@ -572,7 +572,7 @@ 
 	err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
 	if (err < 0)
 		return err;
-	data = (data & 0xfe) | !val;
+	data = (data & 0xfe) | (val ? 0 : 1);
 	err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
 	return err;
 }