Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/hdmi: Use bitwise operators when building register values

Commit c0c0d9eeeb8d ("drm/msm: hdmi audio support") uses logical
OR operators to build up a value to be written in the
REG_HDMI_AUDIO_INFO0 and REG_HDMI_AUDIO_INFO1 registers when it
should have used bitwise operators.

Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Fixes: c0c0d9eeeb8d ("drm/msm: hdmi audio support")
Signed-off-by: Rob Clark <robdclark@gmail.com>

authored by

Liviu Dudau and committed by
Rob Clark
ffe8f53f 52260ae4

+3 -3
+3 -3
drivers/gpu/drm/msm/hdmi/hdmi_audio.c
··· 175 175 /* configure infoframe: */ 176 176 hdmi_audio_infoframe_pack(info, buf, sizeof(buf)); 177 177 hdmi_write(hdmi, REG_HDMI_AUDIO_INFO0, 178 - (buf[3] << 0) || (buf[4] << 8) || 179 - (buf[5] << 16) || (buf[6] << 24)); 178 + (buf[3] << 0) | (buf[4] << 8) | 179 + (buf[5] << 16) | (buf[6] << 24)); 180 180 hdmi_write(hdmi, REG_HDMI_AUDIO_INFO1, 181 - (buf[7] << 0) || (buf[8] << 8)); 181 + (buf[7] << 0) | (buf[8] << 8)); 182 182 183 183 hdmi_write(hdmi, REG_HDMI_GC, 0); 184 184