From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Wojciech Jablonski Date: Tue, 26 Feb 2019 12:45:35 +0100 Subject: [PATCH] ASoC: Intel: Skl: Virt: Fix compilation BE and FE at once When BE and FE drivers are compiled at once there is an error caused by multiple definitions of get_kctl_proxy function. This patch fix this issue by providing one universal definition of get_kctl_proxy. Change-Id: I3a4091f8f5d620bcc43b51d24a15c3fa13ea352a Tracked-On: OAM-76301 Tested-by: gkblditp Reviewed-by: Rojewski, Cezary --- sound/soc/intel/skylake/virtio/skl-virtio-be.c | 10 ---------- sound/soc/intel/skylake/virtio/skl-virtio-be.h | 1 - sound/soc/intel/skylake/virtio/skl-virtio-common.h | 1 - sound/soc/intel/skylake/virtio/skl-virtio-fe.c | 5 ----- sound/soc/intel/skylake/virtio/skl-virtio-fe.h | 1 - sound/soc/intel/skylake/virtio/skl-virtio-kctl.c | 7 +++++++ 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/sound/soc/intel/skylake/virtio/skl-virtio-be.c b/sound/soc/intel/skylake/virtio/skl-virtio-be.c index fd0dccde2801..8a298d1d1426 100644 --- a/sound/soc/intel/skylake/virtio/skl-virtio-be.c +++ b/sound/soc/intel/skylake/virtio/skl-virtio-be.c @@ -41,16 +41,6 @@ static struct vbe_static_kctl_domain kctl_domain_map[] = { KCTL_DOMAIN_ITEM("Speaker Switch", 0x1), }; -static struct snd_skl_vbe *get_virtio_audio_be(void) -{ - return &get_virtio_audio()->vbe; -} - -struct kctl_proxy *get_kctl_proxy(void) -{ - return &get_virtio_audio_be()->kcon_proxy; -} - const struct vbe_substream_info *vbe_find_substream_info_by_pcm( const struct snd_skl_vbe_client *client, char *pcm_id, int direction) { diff --git a/sound/soc/intel/skylake/virtio/skl-virtio-be.h b/sound/soc/intel/skylake/virtio/skl-virtio-be.h index 9ccfed50792a..327f78f23d74 100644 --- a/sound/soc/intel/skylake/virtio/skl-virtio-be.h +++ b/sound/soc/intel/skylake/virtio/skl-virtio-be.h @@ -67,7 +67,6 @@ struct snd_skl_vbe { struct device *dev; struct virtio_dev_info dev_info; struct virtio_vq_info vqs[SKL_VIRTIO_NUM_OF_VQS]; - struct kctl_proxy kcon_proxy; spinlock_t posn_lock; diff --git a/sound/soc/intel/skylake/virtio/skl-virtio-common.h b/sound/soc/intel/skylake/virtio/skl-virtio-common.h index 3fada1fb3c8e..879993bb91e7 100644 --- a/sound/soc/intel/skylake/virtio/skl-virtio-common.h +++ b/sound/soc/intel/skylake/virtio/skl-virtio-common.h @@ -251,7 +251,6 @@ struct kctl_proxy { struct list_head domain_list; }; -struct kctl_proxy *get_kctl_proxy(void); int kctl_ipc_handle(u32 domain_id, const struct vfe_kctl_info *kctl_info, struct vfe_kctl_value *kcontrol_val, struct vfe_kctl_result *result); void kctl_init_proxy(struct device *dev, struct kctl_ops *kt_ops); diff --git a/sound/soc/intel/skylake/virtio/skl-virtio-fe.c b/sound/soc/intel/skylake/virtio/skl-virtio-fe.c index 900956133940..0114633e76e5 100644 --- a/sound/soc/intel/skylake/virtio/skl-virtio-fe.c +++ b/sound/soc/intel/skylake/virtio/skl-virtio-fe.c @@ -49,11 +49,6 @@ static struct snd_skl_vfe *get_virtio_audio_fe(void) return skl_vfe; } -struct kctl_proxy *get_kctl_proxy(void) -{ - return &get_virtio_audio_fe()->kcon_proxy; -} - struct vfe_substream_info *vfe_find_substream_info_by_pcm( struct snd_skl_vfe *vfe, char *pcm_id, int direction) { diff --git a/sound/soc/intel/skylake/virtio/skl-virtio-fe.h b/sound/soc/intel/skylake/virtio/skl-virtio-fe.h index 243fdc8d533e..74e7acbc6856 100644 --- a/sound/soc/intel/skylake/virtio/skl-virtio-fe.h +++ b/sound/soc/intel/skylake/virtio/skl-virtio-fe.h @@ -41,7 +41,6 @@ struct snd_skl_vfe { struct ipc_message *msg; void *in_buff[VFE_MSG_BUFF_NUM]; - struct kctl_proxy kcon_proxy; struct vskl_vfe_tplg tplg; struct work_struct init_work; diff --git a/sound/soc/intel/skylake/virtio/skl-virtio-kctl.c b/sound/soc/intel/skylake/virtio/skl-virtio-kctl.c index c57ab912309e..fd97e3462929 100644 --- a/sound/soc/intel/skylake/virtio/skl-virtio-kctl.c +++ b/sound/soc/intel/skylake/virtio/skl-virtio-kctl.c @@ -15,6 +15,13 @@ #include #include "skl-virtio-common.h" +static struct kctl_proxy ctl_proxy; + +static struct kctl_proxy *get_kctl_proxy(void) +{ + return &ctl_proxy; +} + static struct kctl_domain *find_domain(struct kctl_proxy *proxy, u32 domain_id) { -- https://clearlinux.org