Skip to contentSkip to conversation

staging: go7007: fix test for V4L2_STD_SECAM

media Dan Carpenter 2 participants 2 messages Jan 28, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

The current test doesn't make a lot of sense. It's likely to be true, which is what we would want in most cases. From looking at how this is handled in other drivers, I think "&" was intended instead of "*". It's an easy mistake to make because they are next to each other on the keyboard.

drivers/staging/media/go7007/wis-saa7113.c +1 -1
index 8810c1e..891cde7 100644
@@ -141,7 +141,7 @@ static int wis_saa7113_command(struct i2c_client *client,
 		} else if (dec->norm & V4L2_STD_PAL) {
 			write_reg(client, 0x0e, 0x01);
 			write_reg(client, 0x10, 0x48);
-		} else if (dec->norm * V4L2_STD_SECAM) {
+		} else if (dec->norm & V4L2_STD_SECAM) {
 			write_reg(client, 0x0e, 0x50);
 			write_reg(client, 0x10, 0x48);
 		}
Acked-by
#1 lore raw
Quoted 7 lines · On Mon January 28 2013 15:19:42 Dan Carpenter wrote:

The current test doesn't make a lot of sense. It's likely to be true, which is what we would want in most cases. From looking at how this is handled in other drivers, I think "&" was intended instead of "*". It's an easy mistake to make because they are next to each other on the keyboard.

For the record, it should indeed be '&'. Nice catch.

Regards,

Hans

Quoted 19 lines
drivers/staging/media/go7007/wis-saa7113.c +1 -2
index 8810c1e..891cde7 100644
@@ -141,7 +141,7 @@ static int wis_saa7113_command(struct i2c_client *client,
 		} else if (dec->norm & V4L2_STD_PAL) {
 			write_reg(client, 0x0e, 0x01);
 			write_reg(client, 0x10, 0x48);
-		} else if (dec->norm * V4L2_STD_SECAM) {
+		} else if (dec->norm & V4L2_STD_SECAM) {
 			write_reg(client, 0x0e, 0x50);
 			write_reg(client, 0x10, 0x48);
 		}
--

To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html