diff options
author | Sean Young <sean@mess.org> | 2018-01-05 08:26:51 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-01-23 07:26:50 -0500 |
commit | ddf9c1bb3d2ae24a216237d8195bb31ff632d8e5 (patch) | |
tree | ba9dcf0d8b1e87c6e3f67c4e4f5af6c2798e7993 /drivers/media/rc/rc-core-priv.h | |
parent | e3cd973429ff7d05480b3889a9a6f4b658083137 (diff) |
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>
Diffstat (limited to 'drivers/media/rc/rc-core-priv.h')
-rw-r--r-- | drivers/media/rc/rc-core-priv.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h index 3c3d2620f0e8..458e9eb2d6a9 100644 --- a/drivers/media/rc/rc-core-priv.h +++ b/drivers/media/rc/rc-core-priv.h @@ -166,17 +166,17 @@ static inline void init_ir_raw_event_duration(struct ir_raw_event *ev, /** * struct ir_raw_timings_manchester - Manchester coding timings - * @leader: duration of leader pulse (if any) 0 if continuing - * existing signal (see @pulse_space_start) - * @pulse_space_start: 1 for starting with pulse (0 for starting with space) + * @leader_pulse: duration of leader pulse (if any) 0 if continuing + * existing signal + * @leader_space: duration of leader space (if any) * @clock: duration of each pulse/space in ns * @invert: if set clock logic is inverted * (0 = space + pulse, 1 = pulse + space) * @trailer_space: duration of trailer space in ns */ struct ir_raw_timings_manchester { - unsigned int leader; - unsigned int pulse_space_start:1; + unsigned int leader_pulse; + unsigned int leader_space; unsigned int clock; unsigned int invert:1; unsigned int trailer_space; |