media: rc: clean up leader pulse/space for manchester encoding

The IR rc6 encoder sends the header using manchester encoding using 0
bits, which causes the following:

UBSAN: Undefined behaviour in drivers/media/rc/rc-ir-raw.c:247:6
shift exponent 4294967295 is too large for 64-bit type 'long long unsigned int'

So, allow the leader code to send a pulse and space and remove the unused
pulse_space_start field.

Cc: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
这个提交包含在:
Sean Young
2018-01-05 08:26:51 -05:00
提交者 Mauro Carvalho Chehab
父节点 e3cd973429
当前提交 ddf9c1bb3d
修改 5 个文件,包含 24 行新增44 行删除

查看文件

@@ -173,16 +173,14 @@ out:
}
static const struct ir_raw_timings_manchester ir_rc5_timings = {
.leader = RC5_UNIT,
.pulse_space_start = 0,
.leader_pulse = RC5_UNIT,
.clock = RC5_UNIT,
.trailer_space = RC5_UNIT * 10,
};
static const struct ir_raw_timings_manchester ir_rc5x_timings[2] = {
{
.leader = RC5_UNIT,
.pulse_space_start = 0,
.leader_pulse = RC5_UNIT,
.clock = RC5_UNIT,
.trailer_space = RC5X_SPACE,
},
@@ -193,8 +191,7 @@ static const struct ir_raw_timings_manchester ir_rc5x_timings[2] = {
};
static const struct ir_raw_timings_manchester ir_rc5_sz_timings = {
.leader = RC5_UNIT,
.pulse_space_start = 0,
.leader_pulse = RC5_UNIT,
.clock = RC5_UNIT,
.trailer_space = RC5_UNIT * 10,
};