diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2017-01-10 06:44:54 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-30 08:42:31 -0500 |
commit | f9f96fc10c09ca16e336854c08bc1563eed97985 (patch) | |
tree | 0a9b6bf8e70129ebe08fa58b793fdd8eb3a30430 | |
parent | 8015d6b83cadc8f9f94c7bc8430255090ddf43d4 (diff) |
[media] cec: fix wrong last_la determination
Due to an incorrect condition the last_la used for the initial attempt at
claiming a logical address could be wrong.
The last_la wasn't converted to a mask when ANDing with type2mask, so that
test was broken.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/cec/cec-adap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c index ebb5e391b800..87a6b65ed3af 100644 --- a/drivers/media/cec/cec-adap.c +++ b/drivers/media/cec/cec-adap.c | |||
@@ -1206,7 +1206,7 @@ static int cec_config_thread_func(void *arg) | |||
1206 | las->log_addr[i] = CEC_LOG_ADDR_INVALID; | 1206 | las->log_addr[i] = CEC_LOG_ADDR_INVALID; |
1207 | if (last_la == CEC_LOG_ADDR_INVALID || | 1207 | if (last_la == CEC_LOG_ADDR_INVALID || |
1208 | last_la == CEC_LOG_ADDR_UNREGISTERED || | 1208 | last_la == CEC_LOG_ADDR_UNREGISTERED || |
1209 | !(last_la & type2mask[type])) | 1209 | !((1 << last_la) & type2mask[type])) |
1210 | last_la = la_list[0]; | 1210 | last_la = la_list[0]; |
1211 | 1211 | ||
1212 | err = cec_config_log_addr(adap, i, last_la); | 1212 | err = cec_config_log_addr(adap, i, last_la); |