asoc: lahaina: Fix compilation issues when DEBUG_FS is disabled

Fix the compilation issues in audio drivers when CONFIG_DEBUG_FS
is disabled.

Change-Id: I6eeb2b36b054ba30431f7b045c182888997dc331
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Esse commit está contido em:
Prakruthi Deepak Heragu
2020-04-08 15:27:37 -07:00
commit 6b2d8c3234
7 arquivos alterados com 57 adições e 35 exclusões

Ver arquivo

@@ -10,6 +10,7 @@
static struct miscdevice audio_g711alaw_misc;
static struct ws_mgr audio_g711_ws_mgr;
#ifdef CONFIG_DEBUG_FS
static const struct file_operations audio_g711_debug_fops = {
.read = audio_aio_debug_read,
.open = audio_aio_debug_open,
@@ -20,6 +21,7 @@ static struct dentry *config_debugfs_create_file(const char *name, void *data)
return debugfs_create_file(name, S_IFREG | 0444,
NULL, (void *)data, &audio_g711_debug_fops);
}
#endif
static int g711_channel_map(u8 *channel_mapping, uint32_t channels);
@@ -278,6 +280,7 @@ static int audio_open(struct inode *inode, struct file *file)
}
snprintf(name, sizeof(name), "msm_g711_%04x", audio->ac->session);
#ifdef CONFIG_DEBUG_FS
audio->dentry = config_debugfs_create_file(name, (void *)audio);
if (IS_ERR_OR_NULL(audio->dentry))
@@ -285,6 +288,7 @@ static int audio_open(struct inode *inode, struct file *file)
pr_debug("%s: g711dec success mode[%d]session[%d]\n", __func__,
audio->feedback,
audio->ac->session);
#endif
return rc;
fail:
q6asm_audio_client_free(audio->ac);