@@ -16,9 +16,9 @@
#include <linux/types.h>
#include <acpi/nhlt.h>
-static struct acpi_table_nhlt2 *acpi_gbl_nhlt;
+static struct acpi_table_nhlt *acpi_gbl_nhlt;
-static struct acpi_table_nhlt2 empty_nhlt = {
+static struct acpi_table_nhlt empty_nhlt = {
.header = {
.signature = ACPI_SIG_NHLT,
},
@@ -65,7 +65,7 @@ EXPORT_SYMBOL_GPL(acpi_nhlt_put_gbl_table);
*
* Return: %true if endpoint matches specified criteria or %false otherwise.
*/
-bool acpi_nhlt_endpoint_match(const struct acpi_nhlt2_endpoint *ep,
+bool acpi_nhlt_endpoint_match(const struct acpi_nhlt_endpoint *ep,
int link_type, int dev_type, int dir, int bus_id)
{
return ep &&
@@ -90,11 +90,11 @@ EXPORT_SYMBOL_GPL(acpi_nhlt_endpoint_match);
* Return: A pointer to endpoint matching the criteria, %NULL if not found or
* an ERR_PTR() otherwise.
*/
-struct acpi_nhlt2_endpoint *
-acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt2 *tb,
+struct acpi_nhlt_endpoint *
+acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt *tb,
int link_type, int dev_type, int dir, int bus_id)
{
- struct acpi_nhlt2_endpoint *ep;
+ struct acpi_nhlt_endpoint *ep;
for_each_nhlt_endpoint(tb, ep)
if (acpi_nhlt_endpoint_match(ep, link_type, dev_type, dir, bus_id))
@@ -116,7 +116,7 @@ EXPORT_SYMBOL_GPL(acpi_nhlt_tb_find_endpoint);
* Return: A pointer to endpoint matching the criteria, %NULL if not found or
* an ERR_PTR() otherwise.
*/
-struct acpi_nhlt2_endpoint *
+struct acpi_nhlt_endpoint *
acpi_nhlt_find_endpoint(int link_type, int dev_type, int dir, int bus_id)
{
/* TODO: Currently limited to table of index 0. */
@@ -136,12 +136,12 @@ EXPORT_SYMBOL_GPL(acpi_nhlt_find_endpoint);
* Return: A pointer to format matching the criteria, %NULL if not found or
* an ERR_PTR() otherwise.
*/
-struct acpi_nhlt2_format_config *
-acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt2_endpoint *ep,
+struct acpi_nhlt_format_config *
+acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt_endpoint *ep,
u16 ch, u32 rate, u16 vbps, u16 bps)
{
- struct acpi_nhlt2_wave_formatext *wav;
- struct acpi_nhlt2_format_config *fmt;
+ struct acpi_nhlt_wave_formatext *wav;
+ struct acpi_nhlt_format_config *fmt;
for_each_nhlt_endpoint_fmtcfg(ep, fmt) {
wav = &fmt->format;
@@ -176,13 +176,13 @@ EXPORT_SYMBOL_GPL(acpi_nhlt_endpoint_find_fmtcfg);
* Return: A pointer to format matching the criteria, %NULL if not found or
* an ERR_PTR() otherwise.
*/
-struct acpi_nhlt2_format_config *
-acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt2 *tb,
+struct acpi_nhlt_format_config *
+acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt *tb,
int link_type, int dev_type, int dir, int bus_id,
u16 ch, u32 rate, u16 vbps, u16 bps)
{
- struct acpi_nhlt2_format_config *fmt;
- struct acpi_nhlt2_endpoint *ep;
+ struct acpi_nhlt_format_config *fmt;
+ struct acpi_nhlt_endpoint *ep;
for_each_nhlt_endpoint(tb, ep) {
if (!acpi_nhlt_endpoint_match(ep, link_type, dev_type, dir, bus_id))
@@ -215,7 +215,7 @@ EXPORT_SYMBOL_GPL(acpi_nhlt_tb_find_fmtcfg);
* Return: A pointer to format matching the criteria, %NULL if not found or
* an ERR_PTR() otherwise.
*/
-struct acpi_nhlt2_format_config *
+struct acpi_nhlt_format_config *
acpi_nhlt_find_fmtcfg(int link_type, int dev_type, int dir, int bus_id,
u16 ch, u32 rate, u16 vbps, u16 bps)
{
@@ -244,10 +244,10 @@ static bool acpi_nhlt_config_is_vendor_micdevice(struct acpi_nhlt_config *cfg)
*
* Return: A number of microphones or an error code if an invalid endpoint is provided.
*/
-int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt2_endpoint *ep)
+int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt_endpoint *ep)
{
union acpi_nhlt_device_config *devcfg;
- struct acpi_nhlt2_format_config *fmt;
+ struct acpi_nhlt_format_config *fmt;
struct acpi_nhlt_config *cfg;
u16 max_ch = 0;
@@ -1894,7 +1894,7 @@ struct nfit_device_handle {
*
******************************************************************************/
-struct acpi_table_nhlt2 {
+struct acpi_table_nhlt {
struct acpi_table_header header; /* Common ACPI table header */
u8 endpoints_count;
/*
@@ -1903,7 +1903,7 @@ struct acpi_table_nhlt2 {
*/
};
-struct acpi_nhlt2_endpoint {
+struct acpi_nhlt_endpoint {
u32 length;
u8 link_type;
u8 instance_id;
@@ -1990,7 +1990,7 @@ struct acpi_nhlt_micdevice_config {
#define ACPI_NHLT_ARRAYTYPE_LINEAR4_GEO2 0xE
#define ACPI_NHLT_ARRAYTYPE_VENDOR 0xF
-struct acpi_nhlt2_vendor_mic_config {
+struct acpi_nhlt_vendor_mic_config {
u8 type;
u8 panel;
u16 speaker_position_distance; /* mm */
@@ -2031,7 +2031,7 @@ struct acpi_nhlt_vendor_micdevice_config {
u8 config_type;
u8 array_type;
u8 mics_count;
- struct acpi_nhlt2_vendor_mic_config mics[];
+ struct acpi_nhlt_vendor_mic_config mics[];
};
union acpi_nhlt_device_config {
@@ -2042,7 +2042,7 @@ union acpi_nhlt_device_config {
};
/* Inherited from Microsoft's WAVEFORMATEXTENSIBLE. */
-struct acpi_nhlt2_wave_formatext {
+struct acpi_nhlt_wave_formatext {
u16 format_tag;
u16 channel_count;
u32 samples_per_sec;
@@ -2055,17 +2055,17 @@ struct acpi_nhlt2_wave_formatext {
u8 subformat[16];
};
-struct acpi_nhlt2_format_config {
- struct acpi_nhlt2_wave_formatext format;
+struct acpi_nhlt_format_config {
+ struct acpi_nhlt_wave_formatext format;
struct acpi_nhlt_config config;
};
-struct acpi_nhlt2_formats_config {
+struct acpi_nhlt_formats_config {
u8 formats_count;
- struct acpi_nhlt2_format_config formats[];
+ struct acpi_nhlt_format_config formats[];
};
-struct acpi_nhlt2_device_info {
+struct acpi_nhlt_device_info {
u8 id[16];
u8 instance_id;
u8 port_id;
@@ -2073,7 +2073,7 @@ struct acpi_nhlt2_device_info {
struct acpi_nhlt_devices_info {
u8 devices_count;
- struct acpi_nhlt2_device_info devices[];
+ struct acpi_nhlt_device_info devices[];
};
/*******************************************************************************
@@ -23,12 +23,12 @@
*
* Return: A pointer to the formats configuration space.
*/
-static inline struct acpi_nhlt2_formats_config *
-acpi_nhlt_endpoint_fmtscfg(const struct acpi_nhlt2_endpoint *ep)
+static inline struct acpi_nhlt_formats_config *
+acpi_nhlt_endpoint_fmtscfg(const struct acpi_nhlt_endpoint *ep)
{
struct acpi_nhlt_config *cfg = __acpi_nhlt_endpoint_config(ep);
- return (struct acpi_nhlt2_formats_config *)((u8 *)(cfg + 1) + cfg->capabilities_size);
+ return (struct acpi_nhlt_formats_config *)((u8 *)(cfg + 1) + cfg->capabilities_size);
}
#define __acpi_nhlt_first_endpoint(tb) \
@@ -99,24 +99,24 @@ acpi_nhlt_endpoint_fmtscfg(const struct acpi_nhlt2_endpoint *ep)
acpi_status acpi_nhlt_get_gbl_table(void);
void acpi_nhlt_put_gbl_table(void);
-bool acpi_nhlt_endpoint_match(const struct acpi_nhlt2_endpoint *ep,
+bool acpi_nhlt_endpoint_match(const struct acpi_nhlt_endpoint *ep,
int link_type, int dev_type, int dir, int bus_id);
-struct acpi_nhlt2_endpoint *
-acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt2 *tb,
+struct acpi_nhlt_endpoint *
+acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt *tb,
int link_type, int dev_type, int dir, int bus_id);
-struct acpi_nhlt2_endpoint *
+struct acpi_nhlt_endpoint *
acpi_nhlt_find_endpoint(int link_type, int dev_type, int dir, int bus_id);
-struct acpi_nhlt2_format_config *
-acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt2_endpoint *ep,
+struct acpi_nhlt_format_config *
+acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt_endpoint *ep,
u16 ch, u32 rate, u16 vbps, u16 bps);
-struct acpi_nhlt2_format_config *
-acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt2 *tb,
+struct acpi_nhlt_format_config *
+acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt *tb,
int link_type, int dev_type, int dir, int bus_id,
u16 ch, u32 rate, u16 vpbs, u16 bps);
-struct acpi_nhlt2_format_config *
+struct acpi_nhlt_format_config *
acpi_nhlt_find_fmtcfg(int link_type, int dev_type, int dir, int bus_id,
u16 ch, u32 rate, u16 vpbs, u16 bps);
-int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt2_endpoint *ep);
+int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt_endpoint *ep);
#else /* !CONFIG_ACPI_NHLT */
@@ -130,46 +130,46 @@ static inline void acpi_nhlt_put_gbl_table(void)
}
static inline bool
-acpi_nhlt_endpoint_match(const struct acpi_nhlt2_endpoint *ep,
+acpi_nhlt_endpoint_match(const struct acpi_nhlt_endpoint *ep,
int link_type, int dev_type, int dir, int bus_id)
{
return false;
}
-static inline struct acpi_nhlt2_endpoint *
-acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt2 *tb,
+static inline struct acpi_nhlt_endpoint *
+acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt *tb,
int link_type, int dev_type, int dir, int bus_id)
{
return NULL;
}
-static inline struct acpi_nhlt2_format_config *
-acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt2_endpoint *ep,
+static inline struct acpi_nhlt_format_config *
+acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt_endpoint *ep,
u16 ch, u32 rate, u16 vbps, u16 bps)
{
return NULL;
}
-static inline struct acpi_nhlt2_format_config *
-acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt2 *tb,
+static inline struct acpi_nhlt_format_config *
+acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt *tb,
int link_type, int dev_type, int dir, int bus_id,
u16 ch, u32 rate, u16 vpbs, u16 bps)
{
return NULL;
}
-static inline int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt2_endpoint *ep)
+static inline int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt_endpoint *ep)
{
return 0;
}
-static inline struct acpi_nhlt2_endpoint *
+static inline struct acpi_nhlt_endpoint *
acpi_nhlt_find_endpoint(int link_type, int dev_type, int dir, int bus_id)
{
return NULL;
}
-static inline struct acpi_nhlt2_format_config *
+static inline struct acpi_nhlt_format_config *
acpi_nhlt_find_fmtcfg(int link_type, int dev_type, int dir, int bus_id,
u16 ch, u32 rate, u16 vpbs, u16 bps)
{
Few recently introduced structs are named 'nhlt2' instead of 'nhlt' to avoid naming conflicts. With duplicate types gone, the conflicts are no more. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> --- drivers/acpi/nhlt.c | 36 ++++++++++++++++----------------- include/acpi/actbl2.h | 22 ++++++++++----------- include/acpi/nhlt.h | 46 +++++++++++++++++++++---------------------- 3 files changed, 52 insertions(+), 52 deletions(-)