Skip to content

Commit

Permalink
ASoC: amd: acp: declare and add prefix to 'bt_uart_enable' symbol
Browse files Browse the repository at this point in the history
Sparse reports the following warning:

sound/soc/amd/acp-pcm-dma.c:39:6: error: symbol 'bt_uart_enable' was
not declared. Should it be static?

It's not very good practice to export such symbols that can easily
conflict, add the acp_ prefix and add declaration in header file.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  • Loading branch information
plbossart committed Aug 17, 2021
1 parent 270a6f6 commit 34fd061
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions sound/soc/amd/acp-da7219-max98357a.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static struct clk *da7219_dai_wclk;
static struct clk *da7219_dai_bclk;
static struct clk *rt5682_dai_wclk;
static struct clk *rt5682_dai_bclk;
extern bool bt_uart_enable;

void *acp_soc_is_rltk_max(struct device *dev);

static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
Expand Down Expand Up @@ -760,8 +760,8 @@ static int cz_probe(struct platform_device *pdev)
"devm_snd_soc_register_card(%s) failed\n",
card->name);
}
bt_uart_enable = !device_property_read_bool(&pdev->dev,
"bt-pad-enable");
acp_bt_uart_enable = !device_property_read_bool(&pdev->dev,
"bt-pad-enable");
return 0;
}

Expand Down
6 changes: 3 additions & 3 deletions sound/soc/amd/acp-pcm-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
#define ST_MIN_BUFFER ST_MAX_BUFFER

#define DRV_NAME "acp_audio_dma"
bool bt_uart_enable = true;
EXPORT_SYMBOL(bt_uart_enable);
bool acp_bt_uart_enable = true;
EXPORT_SYMBOL(acp_bt_uart_enable);

static const struct snd_pcm_hardware acp_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
Expand Down Expand Up @@ -596,7 +596,7 @@ static int acp_init(void __iomem *acp_mmio, u32 asic_type)
acp_reg_write(val, acp_mmio, mmACP_SOFT_RESET);

/* For BT instance change pins from UART to BT */
if (!bt_uart_enable) {
if (!acp_bt_uart_enable) {
val = acp_reg_read(acp_mmio, mmACP_BT_UART_PAD_SEL);
val |= ACP_BT_UART_PAD_SELECT_MASK;
acp_reg_write(val, acp_mmio, mmACP_BT_UART_PAD_SEL);
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/amd/acp.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@ typedef struct acp_dma_dscr_transfer {
u32 reserved;
} acp_dma_dscr_transfer_t;

extern bool acp_bt_uart_enable;

#endif /*__ACP_HW_H */

0 comments on commit 34fd061

Please sign in to comment.