]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
soundwire: intel_init: add checks on link numbers
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 22 May 2019 19:47:31 +0000 (14:47 -0500)
committerVinod Koul <vkoul@kernel.org>
Mon, 27 May 2019 05:23:00 +0000 (10:53 +0530)
commit432732b801c82b139f8ca72e3b284fb999ac40d2
tree5f3f8fdf396bb9fdfaeead11617a3f472fc71506
parent27f14331a7d434ff860b3d23c2379cf1fb814a3c
soundwire: intel_init: add checks on link numbers

Add mask to correctly read the SoundWire SHIM LCAP register. Only bits
2..0 are meaningful, the rest is about link synchronization and stream
channel mapping. Without this mask, the hardware information would
always be larger than whatever the BIOS would report.

Also trap the case with zero links.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/intel_init.c