Merge "asoc: lahaina: Fix compilation issues when DEBUG_FS is disabled" into audio-drivers.lnx.5.0
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
acc2efac70
@@ -10,6 +10,7 @@
|
||||
static struct miscdevice audio_alac_misc;
|
||||
static struct ws_mgr audio_alac_ws_mgr;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static const struct file_operations audio_alac_debug_fops = {
|
||||
.read = audio_aio_debug_read,
|
||||
.open = audio_aio_debug_open,
|
||||
@@ -20,7 +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_alac_debug_fops);
|
||||
}
|
||||
|
||||
#endif
|
||||
static int alac_channel_map(u8 *channel_mapping, uint32_t channels);
|
||||
|
||||
static long audio_ioctl_shared(struct file *file, unsigned int cmd,
|
||||
@@ -323,6 +324,7 @@ static int audio_open(struct inode *inode, struct file *file)
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "msm_alac_%04x", audio->ac->session);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
audio->dentry = config_debugfs_create_file(name, (void *)audio);
|
||||
|
||||
if (IS_ERR_OR_NULL(audio->dentry))
|
||||
@@ -330,6 +332,7 @@ static int audio_open(struct inode *inode, struct file *file)
|
||||
pr_debug("%s:alacdec success mode[%d]session[%d]\n", __func__,
|
||||
audio->feedback,
|
||||
audio->ac->session);
|
||||
#endif
|
||||
return rc;
|
||||
fail:
|
||||
q6asm_audio_client_free(audio->ac);
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
static struct miscdevice audio_ape_misc;
|
||||
static struct ws_mgr audio_ape_ws_mgr;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static const struct file_operations audio_ape_debug_fops = {
|
||||
.read = audio_aio_debug_read,
|
||||
.open = audio_aio_debug_open,
|
||||
@@ -19,7 +19,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_ape_debug_fops);
|
||||
}
|
||||
|
||||
#endif
|
||||
static long audio_ioctl_shared(struct file *file, unsigned int cmd,
|
||||
void *arg)
|
||||
{
|
||||
@@ -305,6 +305,7 @@ static int audio_open(struct inode *inode, struct file *file)
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "msm_ape_%04x", audio->ac->session);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
audio->dentry = config_debugfs_create_file(name, (void *)audio);
|
||||
|
||||
if (IS_ERR_OR_NULL(audio->dentry))
|
||||
@@ -312,6 +313,7 @@ static int audio_open(struct inode *inode, struct file *file)
|
||||
pr_debug("%s:apedec success mode[%d]session[%d]\n", __func__,
|
||||
audio->feedback,
|
||||
audio->ac->session);
|
||||
#endif
|
||||
return rc;
|
||||
fail:
|
||||
q6asm_audio_client_free(audio->ac);
|
||||
|
@@ -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);
|
||||
|
@@ -10,6 +10,7 @@
|
||||
static struct miscdevice audio_g711mlaw_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,7 +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);
|
||||
|
||||
static long audio_ioctl_shared(struct file *file, unsigned int cmd,
|
||||
@@ -277,6 +278,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))
|
||||
@@ -284,6 +286,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);
|
||||
|
@@ -218,4 +218,14 @@ int enable_volume_ramp(struct q6audio_aio *audio);
|
||||
int audio_aio_debug_open(struct inode *inode, struct file *file);
|
||||
ssize_t audio_aio_debug_read(struct file *file, char __user *buf,
|
||||
size_t count, loff_t *ppos);
|
||||
#else
|
||||
static inline int audio_aio_debug_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline ssize_t audio_aio_debug_read(struct file *file, char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user