From: Cezary Rojewski <cezary.rojewski@intel.com>
To: alsa-devel@alsa-project.org
Cc: pierre-louis.bossart@linux.intel.com,
"Cezary Rojewski" <cezary.rojewski@intel.com>,
tiwai@suse.com, hdegoede@redhat.com, broonie@kernel.org,
"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Subject: [PATCH 2/5] ALSA: hda: Follow ACPI convention in NHLT struct naming
Date: Fri, 15 Oct 2021 18:40:44 +0200 [thread overview]
Message-ID: <20211015164047.44492-3-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20211015164047.44492-1-cezary.rojewski@intel.com>
From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
All ACPI table structs except for NHLT ones are defined in postfix way.
Update NHLT structs naming to make code cohesive.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
include/sound/intel-nhlt.h | 16 ++++++++--------
sound/hda/intel-dsp-config.c | 2 +-
sound/hda/intel-nhlt.c | 8 ++++----
sound/soc/intel/skylake/skl-nhlt.c | 8 ++++----
sound/soc/intel/skylake/skl.h | 2 +-
sound/soc/sof/intel/hda.c | 2 +-
6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/include/sound/intel-nhlt.h b/include/sound/intel-nhlt.h
index 4debab7c1996..b7eec4b3ca01 100644
--- a/include/sound/intel-nhlt.h
+++ b/include/sound/intel-nhlt.h
@@ -77,7 +77,7 @@ struct nhlt_endpoint {
struct nhlt_specific_cfg config;
} __packed;
-struct nhlt_acpi_table {
+struct acpi_table_nhlt {
struct acpi_table_header header;
u8 endpoint_count;
struct nhlt_endpoint desc[];
@@ -126,26 +126,26 @@ enum {
NHLT_MIC_ARRAY_VENDOR_DEFINED = 0xf,
};
-struct nhlt_acpi_table *intel_nhlt_init(void);
+struct acpi_table_nhlt *intel_nhlt_init(void);
-void intel_nhlt_free(struct nhlt_acpi_table *addr);
+void intel_nhlt_free(struct acpi_table_nhlt *addr);
-int intel_nhlt_get_dmic_geo(struct nhlt_acpi_table *nhlt);
+int intel_nhlt_get_dmic_geo(struct acpi_table_nhlt *nhlt);
#else
-struct nhlt_acpi_table;
+struct acpi_table_nhlt;
-static inline struct nhlt_acpi_table *intel_nhlt_init(void)
+static inline struct acpi_table_nhlt *intel_nhlt_init(void)
{
return NULL;
}
-static inline void intel_nhlt_free(struct nhlt_acpi_table *addr)
+static inline void intel_nhlt_free(struct acpi_table_nhlt *addr)
{
}
-static inline int intel_nhlt_get_dmic_geo(struct nhlt_acpi_table *nhlt)
+static inline int intel_nhlt_get_dmic_geo(struct acpi_table_nhlt *nhlt)
{
return 0;
}
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index 60cc4735c6ec..4c9d5bc39cbd 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -379,7 +379,7 @@ static const struct config_entry *snd_intel_dsp_find_config
static int snd_intel_dsp_check_dmic(struct pci_dev *pci)
{
- struct nhlt_acpi_table *nhlt;
+ struct acpi_table_nhlt *nhlt;
int ret = 0;
nhlt = intel_nhlt_init();
diff --git a/sound/hda/intel-nhlt.c b/sound/hda/intel-nhlt.c
index 195d9e193a6c..c41d20e1b349 100644
--- a/sound/hda/intel-nhlt.c
+++ b/sound/hda/intel-nhlt.c
@@ -6,9 +6,9 @@
#include <linux/acpi.h>
#include <sound/intel-nhlt.h>
-struct nhlt_acpi_table *intel_nhlt_init(void)
+struct acpi_table_nhlt *intel_nhlt_init(void)
{
- struct nhlt_acpi_table *nhlt;
+ struct acpi_table_nhlt *nhlt;
acpi_status status;
status = acpi_get_table(ACPI_SIG_NHLT, 0,
@@ -22,13 +22,13 @@ struct nhlt_acpi_table *intel_nhlt_init(void)
}
EXPORT_SYMBOL_GPL(intel_nhlt_init);
-void intel_nhlt_free(struct nhlt_acpi_table *nhlt)
+void intel_nhlt_free(struct acpi_table_nhlt *nhlt)
{
acpi_put_table((struct acpi_table_header *)nhlt);
}
EXPORT_SYMBOL_GPL(intel_nhlt_free);
-int intel_nhlt_get_dmic_geo(struct nhlt_acpi_table *nhlt)
+int intel_nhlt_get_dmic_geo(struct acpi_table_nhlt *nhlt)
{
struct nhlt_endpoint *epnt;
struct nhlt_dmic_array_config *cfg;
diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
index 64226072f0ee..3033c1bf279f 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -88,7 +88,7 @@ struct nhlt_specific_cfg
struct hdac_bus *bus = skl_to_bus(skl);
struct device *dev = bus->dev;
struct nhlt_specific_cfg *sp_config;
- struct nhlt_acpi_table *nhlt = skl->nhlt;
+ struct acpi_table_nhlt *nhlt = skl->nhlt;
u16 bps = (s_fmt == 16) ? 16 : 32;
u8 j;
@@ -132,7 +132,7 @@ static void skl_nhlt_trim_space(char *trim)
int skl_nhlt_update_topology_bin(struct skl_dev *skl)
{
- struct nhlt_acpi_table *nhlt = (struct nhlt_acpi_table *)skl->nhlt;
+ struct acpi_table_nhlt *nhlt = (struct acpi_table_nhlt *)skl->nhlt;
struct hdac_bus *bus = skl_to_bus(skl);
struct device *dev = bus->dev;
@@ -155,7 +155,7 @@ static ssize_t platform_id_show(struct device *dev,
struct pci_dev *pci = to_pci_dev(dev);
struct hdac_bus *bus = pci_get_drvdata(pci);
struct skl_dev *skl = bus_to_skl(bus);
- struct nhlt_acpi_table *nhlt = (struct nhlt_acpi_table *)skl->nhlt;
+ struct acpi_table_nhlt *nhlt = (struct acpi_table_nhlt *)skl->nhlt;
char platform_id[32];
sprintf(platform_id, "%x-%.6s-%.8s-%d", skl->pci_id,
@@ -335,7 +335,7 @@ static void skl_get_mclk(struct skl_dev *skl, struct skl_ssp_clk *mclk,
void skl_get_clks(struct skl_dev *skl, struct skl_ssp_clk *ssp_clks)
{
- struct nhlt_acpi_table *nhlt = (struct nhlt_acpi_table *)skl->nhlt;
+ struct acpi_table_nhlt *nhlt = (struct acpi_table_nhlt *)skl->nhlt;
struct nhlt_endpoint *epnt;
struct nhlt_fmt *fmt;
int i;
diff --git a/sound/soc/intel/skylake/skl.h b/sound/soc/intel/skylake/skl.h
index 33ed274fc0cb..37195aafbf27 100644
--- a/sound/soc/intel/skylake/skl.h
+++ b/sound/soc/intel/skylake/skl.h
@@ -67,7 +67,7 @@ struct skl_dev {
struct snd_soc_component *component;
struct snd_soc_dai_driver *dais;
- struct nhlt_acpi_table *nhlt; /* nhlt ptr */
+ struct acpi_table_nhlt *nhlt; /* nhlt ptr */
struct list_head ppl_list;
struct list_head bind_list;
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 75c2ee91bf13..4a8907fe7f94 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -648,7 +648,7 @@ static int hda_init(struct snd_sof_dev *sdev)
static int check_nhlt_dmic(struct snd_sof_dev *sdev)
{
- struct nhlt_acpi_table *nhlt;
+ struct acpi_table_nhlt *nhlt;
int dmic_num;
nhlt = intel_nhlt_init();
--
2.25.1
next prev parent reply other threads:[~2021-10-15 16:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 16:40 [PATCH 0/5] ALSA: hda: New NHLT functions and cleanup Cezary Rojewski
2021-10-15 16:40 ` [PATCH 1/5] ALSA: hda: Drop device-argument in NHLT functions Cezary Rojewski
2021-10-15 16:42 ` Pierre-Louis Bossart
2021-10-17 7:52 ` Takashi Iwai
2021-10-18 8:08 ` Cezary Rojewski
2021-10-18 8:25 ` Takashi Iwai
2021-10-18 9:07 ` Cezary Rojewski
2021-10-18 12:01 ` Takashi Iwai
2021-10-18 12:18 ` Cezary Rojewski
2021-10-15 16:40 ` Cezary Rojewski [this message]
2021-10-15 16:40 ` [PATCH 3/5] ALSA: hda: Fill gaps in NHLT endpoint-interface Cezary Rojewski
2021-10-16 3:21 ` kernel test robot
2021-10-16 3:21 ` kernel test robot
2021-10-16 3:21 ` kernel test robot
2021-10-15 16:40 ` [PATCH 4/5] ALSA: hda: Simplify DMIC-in-NHLT check Cezary Rojewski
2021-10-16 5:09 ` kernel test robot
2021-10-16 5:09 ` kernel test robot
2021-10-16 5:09 ` kernel test robot
2021-10-15 16:40 ` [PATCH 5/5] ASoC: Intel: Skylake: Use NHLT API to search for blob Cezary Rojewski
2021-10-15 16:42 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211015164047.44492-3-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.