mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
ASoC: SOF: sof-client: Convert sof_client_dev_to_sof_dev into function
Remove the sof_client_dev_to_sof_dev() from the header file and add it as a function in sof-client.c to avoid it's use by client drivers. At the same time mark the sdev and list of sof_client_dev as restricted fro core use only. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Message-ID: <20250829102510.15159-2-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
1b237f190e
commit
850c5dfb17
@@ -838,7 +838,11 @@ int sof_stream_pcm_close(struct snd_sof_dev *sdev,
|
||||
struct snd_pcm_substream *substream);
|
||||
|
||||
/* SOF client support */
|
||||
struct sof_client_dev;
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_CLIENT)
|
||||
struct snd_sof_dev *sof_client_dev_to_sof_dev(struct sof_client_dev *cdev);
|
||||
|
||||
int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, u32 id,
|
||||
const void *data, size_t size);
|
||||
void sof_client_dev_unregister(struct snd_sof_dev *sdev, const char *name, u32 id);
|
||||
@@ -849,6 +853,11 @@ void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev);
|
||||
int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state);
|
||||
int sof_resume_clients(struct snd_sof_dev *sdev);
|
||||
#else /* CONFIG_SND_SOC_SOF_CLIENT */
|
||||
static inline struct snd_sof_dev *
|
||||
sof_client_dev_to_sof_dev(struct sof_client_dev *cdev) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name,
|
||||
u32 id, const void *data, size_t size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user