diff options
| -rw-r--r-- | include/sound/sdca_fdl.h | 30 | ||||
| -rw-r--r-- | sound/soc/intel/avs/debugfs.c | 9 |
2 files changed, 33 insertions, 6 deletions
diff --git a/include/sound/sdca_fdl.h b/include/sound/sdca_fdl.h index f4ba809cb203..fbaf4b384c8a 100644 --- a/include/sound/sdca_fdl.h +++ b/include/sound/sdca_fdl.h @@ -64,6 +64,8 @@ struct fdl_state { SDCA_CTL_XU_FDLD_ACK_TRANSFER | \ SDCA_CTL_XU_FDLD_NEEDS_SET) +#if IS_ENABLED(CONFIG_SND_SOC_SDCA_FDL) + int sdca_fdl_alloc_state(struct sdca_interrupt *interrupt); int sdca_fdl_process(struct sdca_interrupt *interrupt); int sdca_fdl_sync(struct device *dev, struct sdca_function_data *function, @@ -72,4 +74,32 @@ int sdca_fdl_sync(struct device *dev, struct sdca_function_data *function, int sdca_reset_function(struct device *dev, struct sdca_function_data *function, struct regmap *regmap); +#else + +static inline int sdca_fdl_alloc_state(struct sdca_interrupt *interrupt) +{ + return 0; +} + +static inline int sdca_fdl_process(struct sdca_interrupt *interrupt) +{ + return 0; +} + +static inline int sdca_fdl_sync(struct device *dev, + struct sdca_function_data *function, + struct sdca_interrupt_info *info) +{ + return 0; +} + +static inline int sdca_reset_function(struct device *dev, + struct sdca_function_data *function, + struct regmap *regmap) +{ + return 0; +} + +#endif // CONFIG_SND_SOC_SDCA_FDL + #endif // __SDCA_FDL_H__ diff --git a/sound/soc/intel/avs/debugfs.c b/sound/soc/intel/avs/debugfs.c index 3534de46f9e4..701c247227bf 100644 --- a/sound/soc/intel/avs/debugfs.c +++ b/sound/soc/intel/avs/debugfs.c @@ -119,16 +119,13 @@ static ssize_t probe_points_read(struct file *file, char __user *to, size_t coun } for (i = 0; i < num_desc; i++) { - ret = snprintf(buf + len, PAGE_SIZE - len, - "Id: %#010x Purpose: %d Node id: %#x\n", - desc[i].id.value, desc[i].purpose, desc[i].node_id.val); - if (ret < 0) - goto free_desc; + ret = scnprintf(buf + len, PAGE_SIZE - len, + "Id: %#010x Purpose: %d Node id: %#x\n", + desc[i].id.value, desc[i].purpose, desc[i].node_id.val); len += ret; } ret = simple_read_from_buffer(to, count, ppos, buf, len); -free_desc: kfree(desc); exit: kfree(buf); |
