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

soundwire: intel_init: remove check on number of links

The number of links is checked with a chip-dependent helper in the
caller, remove the check in drivers/soundwire/intel_init.c

This change makes intel_init.c hardware-agnostic - which is quite
fitting for a layer that only creates auxiliary devices.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-By: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20221111042653.45520-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Pierre-Louis Bossart and committed by
Mark Brown
2cd24c31 562bb228

-12
-12
drivers/soundwire/intel_init.c
··· 272 272 { 273 273 struct acpi_device *adev = acpi_fetch_acpi_dev(ctx->handle); 274 274 struct sdw_intel_link_dev *ldev; 275 - u32 caps; 276 275 u32 link_mask; 277 276 int i; 278 277 279 278 if (!adev) 280 279 return -EINVAL; 281 - 282 - /* Check SNDWLCAP.LCOUNT */ 283 - caps = ioread32(ctx->mmio_base + ctx->shim_base + SDW_SHIM_LCAP); 284 - caps &= SDW_SHIM_LCAP_LCOUNT_MASK; 285 - 286 - /* Check HW supported vs property value */ 287 - if (caps < ctx->count) { 288 - dev_err(&adev->dev, 289 - "BIOS master count is larger than hardware capabilities\n"); 290 - return -EINVAL; 291 - } 292 280 293 281 if (!ctx->ldev) 294 282 return -EINVAL;