diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2018-01-11 20:52:09 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-12 22:05:41 +0100 |
commit | 2be2d57986431626e905ee344086affa44c5bb9b (patch) | |
tree | 596f8387eb5df595adff10c7f41333002a5f21ab /include/sound | |
parent | ASoC: Intel: bytcht_es8316: fix HID handling (diff) | |
download | linux-2be2d57986431626e905ee344086affa44c5bb9b.tar.xz linux-2be2d57986431626e905ee344086affa44c5bb9b.zip |
ASoC: acpi: remove hard-coded i2c-device name length
Remove hard-codec [16] array size, replace with clearer description and
dependency on ACPI_ID_LEN
No functionality change
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-acpi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h index d1aaf876cd26..83320af8def2 100644 --- a/include/sound/soc-acpi.h +++ b/include/sound/soc-acpi.h @@ -27,6 +27,9 @@ struct snd_soc_acpi_package_context { bool data_valid; }; +/* codec name is used in DAIs is i2c-<HID>:00 with HID being 8 chars */ +#define SND_ACPI_I2C_ID_LEN (4 + ACPI_ID_LEN + 3 + 1) + #if IS_ENABLED(CONFIG_ACPI) /* translation fron HID to I2C name, needed for DAI codec_name */ const char *snd_soc_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN]); |