Re: [PATCH v2 4/4] ASoC: acpi: remove hard-coded i2c-device name length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/7/18 10:41 PM, Vinod Koul wrote:
On Fri, Jan 05, 2018 at 02:55:36PM -0600, Pierre-Louis Bossart wrote:
Remove hard-coded [16] array size, replace with clearer description and
dependency on ACPI_ID_LEN
No functionality change

Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
---
  include/sound/soc-acpi.h                | 3 +++
  sound/soc/intel/boards/bytcht_da7213.c  | 2 +-
  sound/soc/intel/boards/bytcht_es8316.c  | 2 +-
  sound/soc/intel/boards/bytcr_rt5640.c   | 2 +-
  sound/soc/intel/boards/bytcr_rt5651.c   | 2 +-
  sound/soc/intel/boards/cht_bsw_rt5645.c | 4 ++--
  sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +-
  7 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
index d1aaf876cd26..703c78483113 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_SOC_ACPI_I2C_DEVICE_NAME_LEN (4 + ACPI_ID_LEN + 3 + 1)

nitpicking, thats a very long name :(

how about SND_ACPI_I2C_ID_LEN, we can drop SOC. And replace DEVICE_NAME with ID

Fine with me. Andy do you concur or have a more precise suggestion?


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux