From 9731f82d60166a19af6914f998092bbd1560f783 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 3 Aug 2016 02:08:41 +0000 Subject: [PATCH 001/162] ASoC: hdmi-codec: enable multi probe for same device hdmi-codec driver is common HDMI sound driver, but it doesn't care about multi sound ports. For example, hdmi-codec driver is supporting 1 I2S and 1 SPDIF ports, so, we can't use this driver if HDMI has 2 or more I2S ports. And we would like to use multi detection. For example, DesignWare HDMI driver is providing dw_hdmi_bind() to DRM/KMS driver, and it will setups HDMI video/sound. Note is that it will be called under for_each loop of ports. int dw_hdmi_bind(xxx) { /* register hdmi-codec driver here */ } static int xxx_probe(struct platform_device *pdev) { for_each_xxx(xx) { ... dw_hdmi_bind(xxx); ... } } This case, dw_hdmi_bind() would like to use hdmi-codec, and it will be called multiple times for each ports. Here, ASoC's CPU/Codec/Card bind will checks each "of_node" on DT, and hdmi-codec driver is assuming its parent device for it. But it doesn't care about case. Thus, ASoC never detect correct sound card in this case. To solve this issue, this patch checks each parent device, and names "hdmi-hifi.x" in order to each ports. And uses struct snd_soc_component_driver :: of_xlate_dai_name for snd_soc_get_dai_name(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/hdmi-codec.c | 67 +++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index f27d115626db..f64ecaa0141a 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -24,6 +24,15 @@ #include /* This is only to get MAX_ELD_BYTES */ +struct hdmi_device { + struct device *dev; + struct list_head list; + int cnt; +}; +#define pos_to_hdmi_device(pos) container_of((pos), struct hdmi_device, list) +LIST_HEAD(hdmi_device_list); + +#define DAI_NAME_SIZE 16 struct hdmi_codec_priv { struct hdmi_codec_pdata hcd; struct snd_soc_dai_driver *daidrv; @@ -320,7 +329,6 @@ static const struct snd_soc_dai_ops hdmi_dai_ops = { SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE) static struct snd_soc_dai_driver hdmi_i2s_dai = { - .name = "i2s-hifi", .id = DAI_ID_I2S, .playback = { .stream_name = "Playback", @@ -334,7 +342,6 @@ static struct snd_soc_dai_driver hdmi_i2s_dai = { }; static const struct snd_soc_dai_driver hdmi_spdif_dai = { - .name = "spdif-hifi", .id = DAI_ID_SPDIF, .playback = { .stream_name = "Playback", @@ -346,6 +353,27 @@ static const struct snd_soc_dai_driver hdmi_spdif_dai = { .ops = &hdmi_dai_ops, }; +static char hdmi_dai_name[][DAI_NAME_SIZE] = { + "hdmi-hifi.0", + "hdmi-hifi.1", + "hdmi-hifi.2", + "hdmi-hifi.3", +}; + +static int hdmi_of_xlate_dai_name(struct snd_soc_component *component, + struct of_phandle_args *args, + const char **dai_name) +{ + int id = args->args[0]; + + if (id < ARRAY_SIZE(hdmi_dai_name)) { + *dai_name = hdmi_dai_name[id]; + return 0; + } + + return -EAGAIN; +} + static struct snd_soc_codec_driver hdmi_codec = { .controls = hdmi_controls, .num_controls = ARRAY_SIZE(hdmi_controls), @@ -353,6 +381,9 @@ static struct snd_soc_codec_driver hdmi_codec = { .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), .dapm_routes = hdmi_routes, .num_dapm_routes = ARRAY_SIZE(hdmi_routes), + .component_driver = { + .of_xlate_dai_name = hdmi_of_xlate_dai_name, + }, }; static int hdmi_codec_probe(struct platform_device *pdev) @@ -360,6 +391,8 @@ static int hdmi_codec_probe(struct platform_device *pdev) struct hdmi_codec_pdata *hcd = pdev->dev.platform_data; struct device *dev = &pdev->dev; struct hdmi_codec_priv *hcp; + struct hdmi_device *hd; + struct list_head *pos; int dai_count, i = 0; int ret; @@ -381,6 +414,31 @@ static int hdmi_codec_probe(struct platform_device *pdev) if (!hcp) return -ENOMEM; + hd = NULL; + list_for_each(pos, &hdmi_device_list) { + struct hdmi_device *tmp = pos_to_hdmi_device(pos); + + if (tmp->dev == dev->parent) { + hd = tmp; + break; + } + } + + if (!hd) { + hd = devm_kzalloc(dev, sizeof(*hd), GFP_KERNEL); + if (!hd) + return -ENOMEM; + + hd->dev = dev->parent; + + list_add_tail(&hd->list, &hdmi_device_list); + } + + if (hd->cnt >= ARRAY_SIZE(hdmi_dai_name)) { + dev_err(dev, "too many hdmi codec are deteced\n"); + return -EINVAL; + } + hcp->hcd = *hcd; mutex_init(&hcp->current_stream_lock); @@ -393,11 +451,14 @@ static int hdmi_codec_probe(struct platform_device *pdev) hcp->daidrv[i] = hdmi_i2s_dai; hcp->daidrv[i].playback.channels_max = hcd->max_i2s_channels; + hcp->daidrv[i].name = hdmi_dai_name[hd->cnt++]; i++; } - if (hcd->spdif) + if (hcd->spdif) { hcp->daidrv[i] = hdmi_spdif_dai; + hcp->daidrv[i].name = hdmi_dai_name[hd->cnt++]; + } ret = snd_soc_register_codec(dev, &hdmi_codec, hcp->daidrv, dai_count); From 180f58fece4be11125e663983ee3388e6512f159 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:46:41 +0000 Subject: [PATCH 002/162] ASoC: codec duplicated callback function goes to component on sun4i-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sunxi/sun4i-codec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 44f170c73b06..0e19c5070005 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -628,12 +628,14 @@ static const struct snd_soc_dapm_route sun4i_codec_codec_dapm_routes[] = { }; static struct snd_soc_codec_driver sun4i_codec_codec = { - .controls = sun4i_codec_widgets, - .num_controls = ARRAY_SIZE(sun4i_codec_widgets), - .dapm_widgets = sun4i_codec_codec_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(sun4i_codec_codec_dapm_widgets), - .dapm_routes = sun4i_codec_codec_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(sun4i_codec_codec_dapm_routes), + .component_driver = { + .controls = sun4i_codec_widgets, + .num_controls = ARRAY_SIZE(sun4i_codec_widgets), + .dapm_widgets = sun4i_codec_codec_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sun4i_codec_codec_dapm_widgets), + .dapm_routes = sun4i_codec_codec_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(sun4i_codec_codec_dapm_routes), + }, }; static const struct snd_soc_component_driver sun4i_codec_component = { From 90eb10fc4fc2d5977879489324e5c4abe099e650 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:46:59 +0000 Subject: [PATCH 003/162] ASoC: codec duplicated callback function goes to component on pistachio-internal-dac codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/img/pistachio-internal-dac.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/img/pistachio-internal-dac.c b/sound/soc/img/pistachio-internal-dac.c index 162a0fd68c7b..53e11c6d4e22 100644 --- a/sound/soc/img/pistachio-internal-dac.c +++ b/sound/soc/img/pistachio-internal-dac.c @@ -134,12 +134,14 @@ static int pistachio_internal_dac_codec_probe(struct snd_soc_codec *codec) static const struct snd_soc_codec_driver pistachio_internal_dac_driver = { .probe = pistachio_internal_dac_codec_probe, .idle_bias_off = true, - .controls = pistachio_internal_dac_snd_controls, - .num_controls = ARRAY_SIZE(pistachio_internal_dac_snd_controls), - .dapm_widgets = pistachio_internal_dac_widgets, - .num_dapm_widgets = ARRAY_SIZE(pistachio_internal_dac_widgets), - .dapm_routes = pistachio_internal_dac_routes, - .num_dapm_routes = ARRAY_SIZE(pistachio_internal_dac_routes), + .component_driver = { + .controls = pistachio_internal_dac_snd_controls, + .num_controls = ARRAY_SIZE(pistachio_internal_dac_snd_controls), + .dapm_widgets = pistachio_internal_dac_widgets, + .num_dapm_widgets = ARRAY_SIZE(pistachio_internal_dac_widgets), + .dapm_routes = pistachio_internal_dac_routes, + .num_dapm_routes = ARRAY_SIZE(pistachio_internal_dac_routes), + }, }; static int pistachio_internal_dac_probe(struct platform_device *pdev) From 8073aefa60823acf205a1e6a5ea118297179d766 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:36:49 +0000 Subject: [PATCH 004/162] ASoC: remove codec duplicated callback function codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch removes codec side duplicated callback function. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- include/sound/soc.h | 8 -------- sound/soc/soc-core.c | 13 ------------- 2 files changed, 21 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 6144882cc96a..5eb2b38c3437 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -898,14 +898,6 @@ struct snd_soc_codec_driver { int (*resume)(struct snd_soc_codec *); struct snd_soc_component_driver component_driver; - /* Default control and setup, added after probe() is run */ - const struct snd_kcontrol_new *controls; - int num_controls; - const struct snd_soc_dapm_widget *dapm_widgets; - int num_dapm_widgets; - const struct snd_soc_dapm_route *dapm_routes; - int num_dapm_routes; - /* codec wide operations */ int (*set_sysclk)(struct snd_soc_codec *codec, int clk_id, int source, unsigned int freq, int dir); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 16369cad4803..edba975d893e 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3333,19 +3333,6 @@ int snd_soc_register_codec(struct device *dev, if (ret) goto err_free; - if (codec_drv->controls) { - codec->component.controls = codec_drv->controls; - codec->component.num_controls = codec_drv->num_controls; - } - if (codec_drv->dapm_widgets) { - codec->component.dapm_widgets = codec_drv->dapm_widgets; - codec->component.num_dapm_widgets = codec_drv->num_dapm_widgets; - } - if (codec_drv->dapm_routes) { - codec->component.dapm_routes = codec_drv->dapm_routes; - codec->component.num_dapm_routes = codec_drv->num_dapm_routes; - } - if (codec_drv->probe) codec->component.probe = snd_soc_codec_drv_probe; if (codec_drv->remove) From c90e938ebfc3e239818fbb5abe761837f4f80d53 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:47:18 +0000 Subject: [PATCH 005/162] ASoC: codec duplicated callback function goes to component on wm8985 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8985.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c index 7347abff4b2c..bcf34730d507 100644 --- a/sound/soc/codecs/wm8985.c +++ b/sound/soc/codecs/wm8985.c @@ -1110,12 +1110,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8985 = { .set_bias_level = wm8985_set_bias_level, .suspend_bias_off = true, - .controls = wm8985_common_snd_controls, - .num_controls = ARRAY_SIZE(wm8985_common_snd_controls), - .dapm_widgets = wm8985_common_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8985_common_dapm_widgets), - .dapm_routes = wm8985_common_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8985_common_dapm_routes), + .component_driver = { + .controls = wm8985_common_snd_controls, + .num_controls = ARRAY_SIZE(wm8985_common_snd_controls), + .dapm_widgets = wm8985_common_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8985_common_dapm_widgets), + .dapm_routes = wm8985_common_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8985_common_dapm_routes), + }, }; static const struct regmap_config wm8985_regmap = { From 7a3304ea5c783fba6b68c62e17d041dfe9e57d9c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:47:36 +0000 Subject: [PATCH 006/162] ASoC: codec duplicated callback function goes to component on wm8978 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8978.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index d36d6001fbb7..910b36f11264 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -999,12 +999,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8978 = { .resume = wm8978_resume, .set_bias_level = wm8978_set_bias_level, - .controls = wm8978_snd_controls, - .num_controls = ARRAY_SIZE(wm8978_snd_controls), - .dapm_widgets = wm8978_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8978_dapm_widgets), - .dapm_routes = wm8978_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8978_dapm_routes), + .component_driver = { + .controls = wm8978_snd_controls, + .num_controls = ARRAY_SIZE(wm8978_snd_controls), + .dapm_widgets = wm8978_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8978_dapm_widgets), + .dapm_routes = wm8978_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8978_dapm_routes), + }, }; static const struct regmap_config wm8978_regmap_config = { From 48b042380e970b70f1c5453d31c6bbff2114974e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:48:05 +0000 Subject: [PATCH 007/162] ASoC: codec duplicated callback function goes to component on wm8974 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8974.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index dc8c3b1ebb6f..fbda6e3f8a9d 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c @@ -681,12 +681,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8974 = { .set_bias_level = wm8974_set_bias_level, .suspend_bias_off = true, - .controls = wm8974_snd_controls, - .num_controls = ARRAY_SIZE(wm8974_snd_controls), - .dapm_widgets = wm8974_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8974_dapm_widgets), - .dapm_routes = wm8974_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8974_dapm_routes), + .component_driver = { + .controls = wm8974_snd_controls, + .num_controls = ARRAY_SIZE(wm8974_snd_controls), + .dapm_widgets = wm8974_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8974_dapm_widgets), + .dapm_routes = wm8974_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8974_dapm_routes), + }, }; static int wm8974_i2c_probe(struct i2c_client *i2c, From 2fdff3a06e2fdc7ddfb5636e500fcd491c897c7c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:48:24 +0000 Subject: [PATCH 008/162] ASoC: codec duplicated callback function goes to component on wm8903 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8903.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index a26ca490cf31..c19ba7ca3a35 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -1880,12 +1880,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8903 = { .seq_notifier = wm8903_seq_notifier, .suspend_bias_off = true, - .controls = wm8903_snd_controls, - .num_controls = ARRAY_SIZE(wm8903_snd_controls), - .dapm_widgets = wm8903_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8903_dapm_widgets), - .dapm_routes = wm8903_intercon, - .num_dapm_routes = ARRAY_SIZE(wm8903_intercon), + .component_driver = { + .controls = wm8903_snd_controls, + .num_controls = ARRAY_SIZE(wm8903_snd_controls), + .dapm_widgets = wm8903_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8903_dapm_widgets), + .dapm_routes = wm8903_intercon, + .num_dapm_routes = ARRAY_SIZE(wm8903_intercon), + }, }; static const struct regmap_config wm8903_regmap = { From f1d13276e1856814ac02c077ba0829f6d16b9468 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:48:42 +0000 Subject: [PATCH 009/162] ASoC: codec duplicated callback function goes to component on wm8804 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8804.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index 8d914702cae4..af95d648265b 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -545,10 +545,12 @@ static struct snd_soc_dai_driver wm8804_dai = { static const struct snd_soc_codec_driver soc_codec_dev_wm8804 = { .idle_bias_off = true, - .dapm_widgets = wm8804_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), - .dapm_routes = wm8804_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8804_dapm_routes), + .component_driver = { + .dapm_widgets = wm8804_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), + .dapm_routes = wm8804_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8804_dapm_routes), + }, }; const struct regmap_config wm8804_regmap_config = { From 42a60205fff0cacd384ae9497c00de61d5a240bd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:49:02 +0000 Subject: [PATCH 010/162] ASoC: codec duplicated callback function goes to component on wm8776 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8776.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index 5af44f9a8cf2..f17a3a8fffb0 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c @@ -430,12 +430,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8776 = { .set_bias_level = wm8776_set_bias_level, .suspend_bias_off = true, - .controls = wm8776_snd_controls, - .num_controls = ARRAY_SIZE(wm8776_snd_controls), - .dapm_widgets = wm8776_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8776_dapm_widgets), - .dapm_routes = routes, - .num_dapm_routes = ARRAY_SIZE(routes), + .component_driver = { + .controls = wm8776_snd_controls, + .num_controls = ARRAY_SIZE(wm8776_snd_controls), + .dapm_widgets = wm8776_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8776_dapm_widgets), + .dapm_routes = routes, + .num_dapm_routes = ARRAY_SIZE(routes), + }, }; static const struct of_device_id wm8776_of_match[] = { From baa484716a59e86065787ae20008703d178dcec5 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:49:19 +0000 Subject: [PATCH 011/162] ASoC: codec duplicated callback function goes to component on wm8770 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8770.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index df6178464b00..8783a5fc123e 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c @@ -613,12 +613,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8770 = { .set_bias_level = wm8770_set_bias_level, .idle_bias_off = true, - .controls = wm8770_snd_controls, - .num_controls = ARRAY_SIZE(wm8770_snd_controls), - .dapm_widgets = wm8770_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8770_dapm_widgets), - .dapm_routes = wm8770_intercon, - .num_dapm_routes = ARRAY_SIZE(wm8770_intercon), + .component_driver = { + .controls = wm8770_snd_controls, + .num_controls = ARRAY_SIZE(wm8770_snd_controls), + .dapm_widgets = wm8770_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8770_dapm_widgets), + .dapm_routes = wm8770_intercon, + .num_dapm_routes = ARRAY_SIZE(wm8770_intercon), + }, }; static const struct of_device_id wm8770_of_match[] = { From 73238401ee2a344e921165b3d40bab3a89fe0f40 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:49:44 +0000 Subject: [PATCH 012/162] ASoC: codec duplicated callback function goes to component on wm8753 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8753.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index cdcc91282e8a..1bb272c36ad9 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -1484,12 +1484,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8753 = { .set_bias_level = wm8753_set_bias_level, .suspend_bias_off = true, - .controls = wm8753_snd_controls, - .num_controls = ARRAY_SIZE(wm8753_snd_controls), - .dapm_widgets = wm8753_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8753_dapm_widgets), - .dapm_routes = wm8753_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8753_dapm_routes), + .component_driver = { + .controls = wm8753_snd_controls, + .num_controls = ARRAY_SIZE(wm8753_snd_controls), + .dapm_widgets = wm8753_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8753_dapm_widgets), + .dapm_routes = wm8753_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8753_dapm_routes), + }, }; static const struct of_device_id wm8753_of_match[] = { From c107fbaff34eddebeb34714f0334d710ca937091 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:50:02 +0000 Subject: [PATCH 013/162] ASoC: codec duplicated callback function goes to component on wm8750 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8750.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index bd9dcd2161bc..a96a1456897b 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -713,12 +713,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8750 = { .set_bias_level = wm8750_set_bias_level, .suspend_bias_off = true, - .controls = wm8750_snd_controls, - .num_controls = ARRAY_SIZE(wm8750_snd_controls), - .dapm_widgets = wm8750_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets), - .dapm_routes = wm8750_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8750_dapm_routes), + .component_driver = { + .controls = wm8750_snd_controls, + .num_controls = ARRAY_SIZE(wm8750_snd_controls), + .dapm_widgets = wm8750_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8750_dapm_widgets), + .dapm_routes = wm8750_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8750_dapm_routes), + }, }; static const struct of_device_id wm8750_of_match[] = { From 818d2aa162b886e4c1b722ca8661f79384a257e9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:50:19 +0000 Subject: [PATCH 014/162] ASoC: codec duplicated callback function goes to component on wm8741 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8741.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index 36ef91fe0511..3e432721903e 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c @@ -502,10 +502,12 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8741 = { .remove = wm8741_remove, .resume = wm8741_resume, - .dapm_widgets = wm8741_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8741_dapm_widgets), - .dapm_routes = wm8741_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8741_dapm_routes), + .component_driver = { + .dapm_widgets = wm8741_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8741_dapm_widgets), + .dapm_routes = wm8741_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8741_dapm_routes), + }, }; static const struct of_device_id wm8741_of_match[] = { From 5cf0b2bd457ceae21b9a85ca7ecf97ccfbca6e25 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:50:38 +0000 Subject: [PATCH 015/162] ASoC: codec duplicated callback function goes to component on wm8737 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8737.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c index e7807601e675..728c42cc70ca 100644 --- a/sound/soc/codecs/wm8737.c +++ b/sound/soc/codecs/wm8737.c @@ -578,12 +578,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8737 = { .set_bias_level = wm8737_set_bias_level, .suspend_bias_off = true, - .controls = wm8737_snd_controls, - .num_controls = ARRAY_SIZE(wm8737_snd_controls), - .dapm_widgets = wm8737_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8737_dapm_widgets), - .dapm_routes = intercon, - .num_dapm_routes = ARRAY_SIZE(intercon), + .component_driver = { + .controls = wm8737_snd_controls, + .num_controls = ARRAY_SIZE(wm8737_snd_controls), + .dapm_widgets = wm8737_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8737_dapm_widgets), + .dapm_routes = intercon, + .num_dapm_routes = ARRAY_SIZE(intercon), + }, }; static const struct of_device_id wm8737_of_match[] = { From 2cb7474b0c74a6ba433afaa4d69d7ccec310c70e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:50:58 +0000 Subject: [PATCH 016/162] ASoC: codec duplicated callback function goes to component on wm8731 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8731.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index d18261a44256..545fc9ae1a94 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -632,12 +632,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8731 = { .set_bias_level = wm8731_set_bias_level, .suspend_bias_off = true, - .dapm_widgets = wm8731_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), - .dapm_routes = wm8731_intercon, - .num_dapm_routes = ARRAY_SIZE(wm8731_intercon), - .controls = wm8731_snd_controls, - .num_controls = ARRAY_SIZE(wm8731_snd_controls), + .component_driver = { + .controls = wm8731_snd_controls, + .num_controls = ARRAY_SIZE(wm8731_snd_controls), + .dapm_widgets = wm8731_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), + .dapm_routes = wm8731_intercon, + .num_dapm_routes = ARRAY_SIZE(wm8731_intercon), + }, }; static const struct of_device_id wm8731_of_match[] = { From 298e17babf7d3fbc5ab225212cbf3af414d97109 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:51:16 +0000 Subject: [PATCH 017/162] ASoC: codec duplicated callback function goes to component on wm8728 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8728.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index 1564e6926527..dcd64b38bd7d 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c @@ -215,12 +215,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8728 = { .set_bias_level = wm8728_set_bias_level, .suspend_bias_off = true, - .controls = wm8728_snd_controls, - .num_controls = ARRAY_SIZE(wm8728_snd_controls), - .dapm_widgets = wm8728_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8728_dapm_widgets), - .dapm_routes = wm8728_intercon, - .num_dapm_routes = ARRAY_SIZE(wm8728_intercon), + .component_driver = { + .controls = wm8728_snd_controls, + .num_controls = ARRAY_SIZE(wm8728_snd_controls), + .dapm_widgets = wm8728_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8728_dapm_widgets), + .dapm_routes = wm8728_intercon, + .num_dapm_routes = ARRAY_SIZE(wm8728_intercon), + }, }; static const struct of_device_id wm8728_of_match[] = { From e324d8fa47016ca829989b95bc7bb4b550551b47 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:51:40 +0000 Subject: [PATCH 018/162] ASoC: codec duplicated callback function goes to component on wm8711 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8711.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index c759ec068e97..4e8ebefe25f4 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c @@ -372,12 +372,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8711 = { .set_bias_level = wm8711_set_bias_level, .suspend_bias_off = true, - .controls = wm8711_snd_controls, - .num_controls = ARRAY_SIZE(wm8711_snd_controls), - .dapm_widgets = wm8711_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8711_dapm_widgets), - .dapm_routes = wm8711_intercon, - .num_dapm_routes = ARRAY_SIZE(wm8711_intercon), + .component_driver = { + .controls = wm8711_snd_controls, + .num_controls = ARRAY_SIZE(wm8711_snd_controls), + .dapm_widgets = wm8711_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8711_dapm_widgets), + .dapm_routes = wm8711_intercon, + .num_dapm_routes = ARRAY_SIZE(wm8711_intercon), + }, }; static const struct of_device_id wm8711_of_match[] = { From cc469502fecf023330b21e34aae3268fe763e446 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:52:01 +0000 Subject: [PATCH 019/162] ASoC: codec duplicated callback function goes to component on wm8580 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8580.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 66602bf02f6e..2e69270a9015 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -904,12 +904,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8580 = { .remove = wm8580_remove, .set_bias_level = wm8580_set_bias_level, - .controls = wm8580_snd_controls, - .num_controls = ARRAY_SIZE(wm8580_snd_controls), - .dapm_widgets = wm8580_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8580_dapm_widgets), - .dapm_routes = wm8580_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8580_dapm_routes), + .component_driver = { + .controls = wm8580_snd_controls, + .num_controls = ARRAY_SIZE(wm8580_snd_controls), + .dapm_widgets = wm8580_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8580_dapm_widgets), + .dapm_routes = wm8580_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8580_dapm_routes), + }, }; static const struct of_device_id wm8580_of_match[] = { From f8a5c975bd5b7fc5e46fd85b5a65c0028d09f979 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:52:19 +0000 Subject: [PATCH 020/162] ASoC: codec duplicated callback function goes to component on wm8523 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8523.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index aa287a3965e7..0bb189a3d322 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c @@ -418,12 +418,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8523 = { .set_bias_level = wm8523_set_bias_level, .suspend_bias_off = true, - .controls = wm8523_controls, - .num_controls = ARRAY_SIZE(wm8523_controls), - .dapm_widgets = wm8523_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8523_dapm_widgets), - .dapm_routes = wm8523_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8523_dapm_routes), + .component_driver = { + .controls = wm8523_controls, + .num_controls = ARRAY_SIZE(wm8523_controls), + .dapm_widgets = wm8523_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8523_dapm_widgets), + .dapm_routes = wm8523_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8523_dapm_routes), + }, }; static const struct of_device_id wm8523_of_match[] = { From 42c889233d8d5e075fdf8a2643a4ca69a9807075 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:52:40 +0000 Subject: [PATCH 021/162] ASoC: codec duplicated callback function goes to component on wm8510 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8510.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 99e40e629cca..7f93adf7118d 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c @@ -586,12 +586,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8510 = { .set_bias_level = wm8510_set_bias_level, .suspend_bias_off = true, - .controls = wm8510_snd_controls, - .num_controls = ARRAY_SIZE(wm8510_snd_controls), - .dapm_widgets = wm8510_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8510_dapm_widgets), - .dapm_routes = wm8510_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8510_dapm_routes), + .component_driver = { + .controls = wm8510_snd_controls, + .num_controls = ARRAY_SIZE(wm8510_snd_controls), + .dapm_widgets = wm8510_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8510_dapm_widgets), + .dapm_routes = wm8510_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8510_dapm_routes), + }, }; static const struct of_device_id wm8510_of_match[] = { From 786e3a480fa9e04b36191a2529cabfec3e30ad9c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:53:08 +0000 Subject: [PATCH 022/162] ASoC: codec duplicated callback function goes to component on tlv320aic3x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic3x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index a564759845f9..5a8d96ec058c 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1670,12 +1670,14 @@ static struct snd_soc_codec_driver soc_codec_dev_aic3x = { .idle_bias_off = true, .probe = aic3x_probe, .remove = aic3x_remove, - .controls = aic3x_snd_controls, - .num_controls = ARRAY_SIZE(aic3x_snd_controls), - .dapm_widgets = aic3x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(aic3x_dapm_widgets), - .dapm_routes = intercon, - .num_dapm_routes = ARRAY_SIZE(intercon), + .component_driver = { + .controls = aic3x_snd_controls, + .num_controls = ARRAY_SIZE(aic3x_snd_controls), + .dapm_widgets = aic3x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(aic3x_dapm_widgets), + .dapm_routes = intercon, + .num_dapm_routes = ARRAY_SIZE(intercon), + }, }; /* From 1bb99f2a00682162b42998d2bafd7633c6c37541 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:53:34 +0000 Subject: [PATCH 023/162] ASoC: codec duplicated callback function goes to component on tlv320aic31xx codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic31xx.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index 3c5e1df01c19..e46fb472e48d 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -1114,12 +1114,14 @@ static struct snd_soc_codec_driver soc_codec_driver_aic31xx = { .set_bias_level = aic31xx_set_bias_level, .suspend_bias_off = true, - .controls = aic31xx_snd_controls, - .num_controls = ARRAY_SIZE(aic31xx_snd_controls), - .dapm_widgets = aic31xx_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(aic31xx_dapm_widgets), - .dapm_routes = aic31xx_audio_map, - .num_dapm_routes = ARRAY_SIZE(aic31xx_audio_map), + .component_driver = { + .controls = aic31xx_snd_controls, + .num_controls = ARRAY_SIZE(aic31xx_snd_controls), + .dapm_widgets = aic31xx_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(aic31xx_dapm_widgets), + .dapm_routes = aic31xx_audio_map, + .num_dapm_routes = ARRAY_SIZE(aic31xx_audio_map), + }, }; static const struct snd_soc_dai_ops aic31xx_dai_ops = { From e88e495064e602772afa7b165643866acc6da6bf Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:54:25 +0000 Subject: [PATCH 024/162] ASoC: codec duplicated callback function goes to component on tlv320aic23 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic23.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index cd8c02b6e4de..410cae0f2060 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c @@ -583,12 +583,14 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = { .set_bias_level = tlv320aic23_set_bias_level, .suspend_bias_off = true, - .controls = tlv320aic23_snd_controls, - .num_controls = ARRAY_SIZE(tlv320aic23_snd_controls), - .dapm_widgets = tlv320aic23_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(tlv320aic23_dapm_widgets), - .dapm_routes = tlv320aic23_intercon, - .num_dapm_routes = ARRAY_SIZE(tlv320aic23_intercon), + .component_driver = { + .controls = tlv320aic23_snd_controls, + .num_controls = ARRAY_SIZE(tlv320aic23_snd_controls), + .dapm_widgets = tlv320aic23_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tlv320aic23_dapm_widgets), + .dapm_routes = tlv320aic23_intercon, + .num_dapm_routes = ARRAY_SIZE(tlv320aic23_intercon), + }, }; int tlv320aic23_probe(struct device *dev, struct regmap *regmap) From f2dea01ccbfc34a5e631afeb13c7d010d39c2543 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:54:44 +0000 Subject: [PATCH 025/162] ASoC: codec duplicated callback function goes to component on tfa9879 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tfa9879.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/tfa9879.c b/sound/soc/codecs/tfa9879.c index cb5310d89c0f..95e0a7abeb7a 100644 --- a/sound/soc/codecs/tfa9879.c +++ b/sound/soc/codecs/tfa9879.c @@ -231,13 +231,14 @@ static const struct snd_soc_dapm_route tfa9879_dapm_routes[] = { }; static const struct snd_soc_codec_driver tfa9879_codec = { - .controls = tfa9879_controls, - .num_controls = ARRAY_SIZE(tfa9879_controls), - - .dapm_widgets = tfa9879_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(tfa9879_dapm_widgets), - .dapm_routes = tfa9879_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(tfa9879_dapm_routes), + .component_driver = { + .controls = tfa9879_controls, + .num_controls = ARRAY_SIZE(tfa9879_controls), + .dapm_widgets = tfa9879_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tfa9879_dapm_widgets), + .dapm_routes = tfa9879_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(tfa9879_dapm_routes), + }, }; static const struct regmap_config tfa9879_regmap = { From a8f552df807d0c809ec529c8e998a6abbf40f324 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:55:04 +0000 Subject: [PATCH 026/162] ASoC: codec duplicated callback function goes to component on tas5720 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tas5720.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c index f54fb46b77c2..c65b917598d2 100644 --- a/sound/soc/codecs/tas5720.c +++ b/sound/soc/codecs/tas5720.c @@ -489,12 +489,14 @@ static struct snd_soc_codec_driver soc_codec_dev_tas5720 = { .suspend = tas5720_suspend, .resume = tas5720_resume, - .controls = tas5720_snd_controls, - .num_controls = ARRAY_SIZE(tas5720_snd_controls), - .dapm_widgets = tas5720_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(tas5720_dapm_widgets), - .dapm_routes = tas5720_audio_map, - .num_dapm_routes = ARRAY_SIZE(tas5720_audio_map), + .component_driver = { + .controls = tas5720_snd_controls, + .num_controls = ARRAY_SIZE(tas5720_snd_controls), + .dapm_widgets = tas5720_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tas5720_dapm_widgets), + .dapm_routes = tas5720_audio_map, + .num_dapm_routes = ARRAY_SIZE(tas5720_audio_map), + }, }; /* PCM rates supported by the TAS5720 driver */ From d75a9df6927363e5c4a41477db39e5332aa6bf73 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:55:21 +0000 Subject: [PATCH 027/162] ASoC: codec duplicated callback function goes to component on tas571x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tas571x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c index d8baca3f8413..df5e5cb33baa 100644 --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c @@ -658,10 +658,12 @@ static const struct snd_soc_codec_driver tas571x_codec = { .set_bias_level = tas571x_set_bias_level, .idle_bias_off = true, - .dapm_widgets = tas571x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(tas571x_dapm_widgets), - .dapm_routes = tas571x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(tas571x_dapm_routes), + .component_driver = { + .dapm_widgets = tas571x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tas571x_dapm_widgets), + .dapm_routes = tas571x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(tas571x_dapm_routes), + }, }; static struct snd_soc_dai_driver tas571x_dai = { @@ -754,8 +756,8 @@ static int tas571x_i2c_probe(struct i2c_client *client, memcpy(&priv->codec_driver, &tas571x_codec, sizeof(priv->codec_driver)); - priv->codec_driver.controls = priv->chip->controls; - priv->codec_driver.num_controls = priv->chip->num_controls; + priv->codec_driver.component_driver.controls = priv->chip->controls; + priv->codec_driver.component_driver.num_controls = priv->chip->num_controls; if (priv->chip->vol_reg_size == 2) { /* From 9a9a069c4445122b98025e8b1003caf5e0eba037 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:55:41 +0000 Subject: [PATCH 028/162] ASoC: codec duplicated callback function goes to component on tas5086 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tas5086.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c index d49d25d51957..c297b9fc8bf6 100644 --- a/sound/soc/codecs/tas5086.c +++ b/sound/soc/codecs/tas5086.c @@ -890,12 +890,14 @@ static struct snd_soc_codec_driver soc_codec_dev_tas5086 = { .remove = tas5086_remove, .suspend = tas5086_soc_suspend, .resume = tas5086_soc_resume, - .controls = tas5086_controls, - .num_controls = ARRAY_SIZE(tas5086_controls), - .dapm_widgets = tas5086_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(tas5086_dapm_widgets), - .dapm_routes = tas5086_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(tas5086_dapm_routes), + .component_driver = { + .controls = tas5086_controls, + .num_controls = ARRAY_SIZE(tas5086_controls), + .dapm_widgets = tas5086_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tas5086_dapm_widgets), + .dapm_routes = tas5086_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(tas5086_dapm_routes), + }, }; static const struct i2c_device_id tas5086_i2c_id[] = { From e5538659c81991b9074ccb842e8af901c908b79b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:55:58 +0000 Subject: [PATCH 029/162] ASoC: codec duplicated callback function goes to component on tas2552 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tas2552.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index cc1d3981fa4b..baf455e8c2f7 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -667,12 +667,14 @@ static struct snd_soc_codec_driver soc_codec_dev_tas2552 = { .resume = tas2552_resume, .ignore_pmdown_time = true, - .controls = tas2552_snd_controls, - .num_controls = ARRAY_SIZE(tas2552_snd_controls), - .dapm_widgets = tas2552_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(tas2552_dapm_widgets), - .dapm_routes = tas2552_audio_map, - .num_dapm_routes = ARRAY_SIZE(tas2552_audio_map), + .component_driver = { + .controls = tas2552_snd_controls, + .num_controls = ARRAY_SIZE(tas2552_snd_controls), + .dapm_widgets = tas2552_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tas2552_dapm_widgets), + .dapm_routes = tas2552_audio_map, + .num_dapm_routes = ARRAY_SIZE(tas2552_audio_map), + }, }; static const struct regmap_config tas2552_regmap_config = { From 97bf5f33475c1d2db8a5173883acacb961f45563 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:56:24 +0000 Subject: [PATCH 030/162] ASoC: codec duplicated callback function goes to component on sti-sas codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/sti-sas.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c index 160d61a66204..7b31ee9b82bc 100644 --- a/sound/soc/codecs/sti-sas.c +++ b/sound/soc/codecs/sti-sas.c @@ -591,11 +591,11 @@ static int sti_sas_driver_probe(struct platform_device *pdev) sti_sas_dai[STI_SAS_DAI_ANALOG_OUT].ops = drvdata->dev_data->dac_ops; /* Set dapms*/ - sti_sas_driver.dapm_widgets = drvdata->dev_data->dapm_widgets; - sti_sas_driver.num_dapm_widgets = drvdata->dev_data->num_dapm_widgets; + sti_sas_driver.component_driver.dapm_widgets = drvdata->dev_data->dapm_widgets; + sti_sas_driver.component_driver.num_dapm_widgets = drvdata->dev_data->num_dapm_widgets; - sti_sas_driver.dapm_routes = drvdata->dev_data->dapm_routes; - sti_sas_driver.num_dapm_routes = drvdata->dev_data->num_dapm_routes; + sti_sas_driver.component_driver.dapm_routes = drvdata->dev_data->dapm_routes; + sti_sas_driver.component_driver.num_dapm_routes = drvdata->dev_data->num_dapm_routes; /* Store context */ dev_set_drvdata(&pdev->dev, drvdata); From ffbb87c94acf917eccd70c635af58dee60548f3d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:56:41 +0000 Subject: [PATCH 031/162] ASoC: codec duplicated callback function goes to component on sta350 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/sta350.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c index 33a4612f0a07..9644c20f44e3 100644 --- a/sound/soc/codecs/sta350.c +++ b/sound/soc/codecs/sta350.c @@ -1057,12 +1057,14 @@ static const struct snd_soc_codec_driver sta350_codec = { .remove = sta350_remove, .set_bias_level = sta350_set_bias_level, .suspend_bias_off = true, - .controls = sta350_snd_controls, - .num_controls = ARRAY_SIZE(sta350_snd_controls), - .dapm_widgets = sta350_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(sta350_dapm_widgets), - .dapm_routes = sta350_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(sta350_dapm_routes), + .component_driver = { + .controls = sta350_snd_controls, + .num_controls = ARRAY_SIZE(sta350_snd_controls), + .dapm_widgets = sta350_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sta350_dapm_widgets), + .dapm_routes = sta350_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(sta350_dapm_routes), + }, }; static const struct regmap_config sta350_regmap = { From 37f112b39d8442a17ecdc7e72d42145d8cf18d37 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:57:00 +0000 Subject: [PATCH 032/162] ASoC: codec duplicated callback function goes to component on sta32x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/sta32x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index a9844b2ac829..0790ae8530d9 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c @@ -991,12 +991,14 @@ static const struct snd_soc_codec_driver sta32x_codec = { .remove = sta32x_remove, .set_bias_level = sta32x_set_bias_level, .suspend_bias_off = true, - .controls = sta32x_snd_controls, - .num_controls = ARRAY_SIZE(sta32x_snd_controls), - .dapm_widgets = sta32x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(sta32x_dapm_widgets), - .dapm_routes = sta32x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(sta32x_dapm_routes), + .component_driver = { + .controls = sta32x_snd_controls, + .num_controls = ARRAY_SIZE(sta32x_snd_controls), + .dapm_widgets = sta32x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sta32x_dapm_widgets), + .dapm_routes = sta32x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(sta32x_dapm_routes), + }, }; static const struct regmap_config sta32x_regmap = { From b5fce187a54808861bb24d84301a8d6d2559bca9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:57:18 +0000 Subject: [PATCH 033/162] ASoC: codec duplicated callback function goes to component on ssm4567 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ssm4567.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c index 080c78e88e10..2bb5a11c9ba1 100644 --- a/sound/soc/codecs/ssm4567.c +++ b/sound/soc/codecs/ssm4567.c @@ -421,12 +421,14 @@ static struct snd_soc_codec_driver ssm4567_codec_driver = { .set_bias_level = ssm4567_set_bias_level, .idle_bias_off = true, - .controls = ssm4567_snd_controls, - .num_controls = ARRAY_SIZE(ssm4567_snd_controls), - .dapm_widgets = ssm4567_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ssm4567_dapm_widgets), - .dapm_routes = ssm4567_routes, - .num_dapm_routes = ARRAY_SIZE(ssm4567_routes), + .component_driver = { + .controls = ssm4567_snd_controls, + .num_controls = ARRAY_SIZE(ssm4567_snd_controls), + .dapm_widgets = ssm4567_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ssm4567_dapm_widgets), + .dapm_routes = ssm4567_routes, + .num_dapm_routes = ARRAY_SIZE(ssm4567_routes), + }, }; static const struct regmap_config ssm4567_regmap_config = { From 21c822343fc001b16c6865af8925c83268801644 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:57:35 +0000 Subject: [PATCH 034/162] ASoC: codec duplicated callback function goes to component on ssm2602 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ssm2602.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c index 4452fea0b118..993bde29ca1b 100644 --- a/sound/soc/codecs/ssm2602.c +++ b/sound/soc/codecs/ssm2602.c @@ -597,12 +597,14 @@ static struct snd_soc_codec_driver soc_codec_dev_ssm2602 = { .set_bias_level = ssm2602_set_bias_level, .suspend_bias_off = true, - .controls = ssm260x_snd_controls, - .num_controls = ARRAY_SIZE(ssm260x_snd_controls), - .dapm_widgets = ssm260x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ssm260x_dapm_widgets), - .dapm_routes = ssm260x_routes, - .num_dapm_routes = ARRAY_SIZE(ssm260x_routes), + .component_driver = { + .controls = ssm260x_snd_controls, + .num_controls = ARRAY_SIZE(ssm260x_snd_controls), + .dapm_widgets = ssm260x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ssm260x_dapm_widgets), + .dapm_routes = ssm260x_routes, + .num_dapm_routes = ARRAY_SIZE(ssm260x_routes), + }, }; static bool ssm2602_register_volatile(struct device *dev, unsigned int reg) From b9c990da5f258af36acc508f460356e47cd3cb14 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:57:52 +0000 Subject: [PATCH 035/162] ASoC: codec duplicated callback function goes to component on spdif_transmitter codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/spdif_transmitter.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c index ef634a9ad673..ee367536a498 100644 --- a/sound/soc/codecs/spdif_transmitter.c +++ b/sound/soc/codecs/spdif_transmitter.c @@ -38,10 +38,12 @@ static const struct snd_soc_dapm_route dit_routes[] = { }; static struct snd_soc_codec_driver soc_codec_spdif_dit = { - .dapm_widgets = dit_widgets, - .num_dapm_widgets = ARRAY_SIZE(dit_widgets), - .dapm_routes = dit_routes, - .num_dapm_routes = ARRAY_SIZE(dit_routes), + .component_driver = { + .dapm_widgets = dit_widgets, + .num_dapm_widgets = ARRAY_SIZE(dit_widgets), + .dapm_routes = dit_routes, + .num_dapm_routes = ARRAY_SIZE(dit_routes), + }, }; static struct snd_soc_dai_driver dit_stub_dai = { From 35eeafe3bf90d969756c5ef0f996c052ef35959d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:58:11 +0000 Subject: [PATCH 036/162] ASoC: codec duplicated callback function goes to component on spdif_receiver codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/spdif_receiver.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c index 3ec41ccbf4e2..234f87b54838 100644 --- a/sound/soc/codecs/spdif_receiver.c +++ b/sound/soc/codecs/spdif_receiver.c @@ -38,10 +38,12 @@ static const struct snd_soc_dapm_route dir_routes[] = { SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) static struct snd_soc_codec_driver soc_codec_spdif_dir = { - .dapm_widgets = dir_widgets, - .num_dapm_widgets = ARRAY_SIZE(dir_widgets), - .dapm_routes = dir_routes, - .num_dapm_routes = ARRAY_SIZE(dir_routes), + .component_driver = { + .dapm_widgets = dir_widgets, + .num_dapm_widgets = ARRAY_SIZE(dir_widgets), + .dapm_routes = dir_routes, + .num_dapm_routes = ARRAY_SIZE(dir_routes), + }, }; static struct snd_soc_dai_driver dir_stub_dai = { From a324dbe5201aadbd96063404162d996ec8a6ad9e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:58:28 +0000 Subject: [PATCH 037/162] ASoC: codec duplicated callback function goes to component on sgtl5000 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/sgtl5000.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 527b759c1562..a635bd09d637 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1151,12 +1151,14 @@ static struct snd_soc_codec_driver sgtl5000_driver = { .remove = sgtl5000_remove, .set_bias_level = sgtl5000_set_bias_level, .suspend_bias_off = true, - .controls = sgtl5000_snd_controls, - .num_controls = ARRAY_SIZE(sgtl5000_snd_controls), - .dapm_widgets = sgtl5000_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(sgtl5000_dapm_widgets), - .dapm_routes = sgtl5000_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(sgtl5000_dapm_routes), + .component_driver = { + .controls = sgtl5000_snd_controls, + .num_controls = ARRAY_SIZE(sgtl5000_snd_controls), + .dapm_widgets = sgtl5000_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sgtl5000_dapm_widgets), + .dapm_routes = sgtl5000_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(sgtl5000_dapm_routes), + }, }; static const struct regmap_config sgtl5000_regmap = { From f78bc2bf1d336246c85fe5a009104fe7c3f586d9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:58:45 +0000 Subject: [PATCH 038/162] ASoC: codec duplicated callback function goes to component on rt5631 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5631.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c index 1be2bab7dee3..0e418089c053 100644 --- a/sound/soc/codecs/rt5631.c +++ b/sound/soc/codecs/rt5631.c @@ -1657,12 +1657,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5631 = { .probe = rt5631_probe, .set_bias_level = rt5631_set_bias_level, .suspend_bias_off = true, - .controls = rt5631_snd_controls, - .num_controls = ARRAY_SIZE(rt5631_snd_controls), - .dapm_widgets = rt5631_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5631_dapm_widgets), - .dapm_routes = rt5631_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5631_dapm_routes), + .component_driver = { + .controls = rt5631_snd_controls, + .num_controls = ARRAY_SIZE(rt5631_snd_controls), + .dapm_widgets = rt5631_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5631_dapm_widgets), + .dapm_routes = rt5631_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5631_dapm_routes), + }, }; static const struct i2c_device_id rt5631_i2c_id[] = { From 947cd148b43c025bab870f724cba7a17d090f1a5 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:59:05 +0000 Subject: [PATCH 039/162] ASoC: codec duplicated callback function goes to component on rt5616 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5616.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index f527b5b2817b..e92a1490fa68 100644 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1302,12 +1302,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5616 = { .resume = rt5616_resume, .set_bias_level = rt5616_set_bias_level, .idle_bias_off = true, - .controls = rt5616_snd_controls, - .num_controls = ARRAY_SIZE(rt5616_snd_controls), - .dapm_widgets = rt5616_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5616_dapm_widgets), - .dapm_routes = rt5616_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5616_dapm_routes), + .component_driver = { + .controls = rt5616_snd_controls, + .num_controls = ARRAY_SIZE(rt5616_snd_controls), + .dapm_widgets = rt5616_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5616_dapm_widgets), + .dapm_routes = rt5616_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5616_dapm_routes), + }, }; static const struct regmap_config rt5616_regmap = { From d25f113f969eb9a0ae3a61d3937a0fbfe7ecdbdd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:59:23 +0000 Subject: [PATCH 040/162] ASoC: codec duplicated callback function goes to component on pcm512x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/pcm512x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index 047c48953a20..72b19e62f626 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -1348,12 +1348,14 @@ static struct snd_soc_codec_driver pcm512x_codec_driver = { .set_bias_level = pcm512x_set_bias_level, .idle_bias_off = true, - .controls = pcm512x_controls, - .num_controls = ARRAY_SIZE(pcm512x_controls), - .dapm_widgets = pcm512x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(pcm512x_dapm_widgets), - .dapm_routes = pcm512x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(pcm512x_dapm_routes), + .component_driver = { + .controls = pcm512x_controls, + .num_controls = ARRAY_SIZE(pcm512x_controls), + .dapm_widgets = pcm512x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(pcm512x_dapm_widgets), + .dapm_routes = pcm512x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(pcm512x_dapm_routes), + }, }; static const struct regmap_range_cfg pcm512x_range = { From d4fff1ba4768dc7b8dd09db0eee19c1ff098ee60 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:59:41 +0000 Subject: [PATCH 041/162] ASoC: codec duplicated callback function goes to component on pcm3168a codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/pcm3168a.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index 992a77edcd5d..39bc02d5bc5d 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -599,12 +599,14 @@ EXPORT_SYMBOL_GPL(pcm3168a_regmap); static const struct snd_soc_codec_driver pcm3168a_driver = { .idle_bias_off = true, - .controls = pcm3168a_snd_controls, - .num_controls = ARRAY_SIZE(pcm3168a_snd_controls), - .dapm_widgets = pcm3168a_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(pcm3168a_dapm_widgets), - .dapm_routes = pcm3168a_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(pcm3168a_dapm_routes) + .component_driver = { + .controls = pcm3168a_snd_controls, + .num_controls = ARRAY_SIZE(pcm3168a_snd_controls), + .dapm_widgets = pcm3168a_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(pcm3168a_dapm_widgets), + .dapm_routes = pcm3168a_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(pcm3168a_dapm_routes) + }, }; int pcm3168a_probe(struct device *dev, struct regmap *regmap) From 98773a87e83dfd81c77418f2d0f19a63e7476bac Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 08:59:59 +0000 Subject: [PATCH 042/162] ASoC: codec duplicated callback function goes to component on pcm179x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/pcm179x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c index 88fbdd184aa0..b813a154ddd9 100644 --- a/sound/soc/codecs/pcm179x.c +++ b/sound/soc/codecs/pcm179x.c @@ -206,12 +206,14 @@ const struct regmap_config pcm179x_regmap_config = { EXPORT_SYMBOL_GPL(pcm179x_regmap_config); static struct snd_soc_codec_driver soc_codec_dev_pcm179x = { - .controls = pcm179x_controls, - .num_controls = ARRAY_SIZE(pcm179x_controls), - .dapm_widgets = pcm179x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(pcm179x_dapm_widgets), - .dapm_routes = pcm179x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(pcm179x_dapm_routes), + .component_driver = { + .controls = pcm179x_controls, + .num_controls = ARRAY_SIZE(pcm179x_controls), + .dapm_widgets = pcm179x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(pcm179x_dapm_widgets), + .dapm_routes = pcm179x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(pcm179x_dapm_routes), + }, }; int pcm179x_common_init(struct device *dev, struct regmap *regmap) From a005fd746b4a257ff650c4ac9651111a5d580abe Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:00:18 +0000 Subject: [PATCH 043/162] ASoC: codec duplicated callback function goes to component on pcm1681 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/pcm1681.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c index 33e1fc2d1598..0b14efab6280 100644 --- a/sound/soc/codecs/pcm1681.c +++ b/sound/soc/codecs/pcm1681.c @@ -289,12 +289,14 @@ static const struct regmap_config pcm1681_regmap = { }; static struct snd_soc_codec_driver soc_codec_dev_pcm1681 = { - .controls = pcm1681_controls, - .num_controls = ARRAY_SIZE(pcm1681_controls), - .dapm_widgets = pcm1681_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(pcm1681_dapm_widgets), - .dapm_routes = pcm1681_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(pcm1681_dapm_routes), + .component_driver = { + .controls = pcm1681_controls, + .num_controls = ARRAY_SIZE(pcm1681_controls), + .dapm_widgets = pcm1681_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(pcm1681_dapm_widgets), + .dapm_routes = pcm1681_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(pcm1681_dapm_routes), + }, }; static const struct i2c_device_id pcm1681_i2c_id[] = { From 750a33e6173c5ac5f202f15bb092eb4965f4547d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:00:35 +0000 Subject: [PATCH 044/162] ASoC: codec duplicated callback function goes to component on max9860 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max9860.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/max9860.c b/sound/soc/codecs/max9860.c index 68074c92a7c0..499bdbfd0a2d 100644 --- a/sound/soc/codecs/max9860.c +++ b/sound/soc/codecs/max9860.c @@ -538,12 +538,14 @@ static struct snd_soc_codec_driver max9860_codec_driver = { .set_bias_level = max9860_set_bias_level, .idle_bias_off = true, - .controls = max9860_controls, - .num_controls = ARRAY_SIZE(max9860_controls), - .dapm_widgets = max9860_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max9860_dapm_widgets), - .dapm_routes = max9860_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(max9860_dapm_routes), + .component_driver = { + .controls = max9860_controls, + .num_controls = ARRAY_SIZE(max9860_controls), + .dapm_widgets = max9860_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max9860_dapm_widgets), + .dapm_routes = max9860_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(max9860_dapm_routes), + }, }; #ifdef CONFIG_PM From f410a81d4d5fd4d0e9477c5d7ebd4e6712ed4c42 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:00:54 +0000 Subject: [PATCH 045/162] ASoC: codec duplicated callback function goes to component on inno_rk3036 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/inno_rk3036.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c index 9b6e8840a1b5..b918ba5c8ce5 100644 --- a/sound/soc/codecs/inno_rk3036.c +++ b/sound/soc/codecs/inno_rk3036.c @@ -380,12 +380,14 @@ static struct snd_soc_codec_driver rk3036_codec_driver = { .probe = rk3036_codec_probe, .remove = rk3036_codec_remove, .set_bias_level = rk3036_codec_set_bias_level, - .controls = rk3036_codec_dapm_controls, - .num_controls = ARRAY_SIZE(rk3036_codec_dapm_controls), - .dapm_routes = rk3036_codec_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rk3036_codec_dapm_routes), - .dapm_widgets = rk3036_codec_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rk3036_codec_dapm_widgets), + .component_driver = { + .controls = rk3036_codec_dapm_controls, + .num_controls = ARRAY_SIZE(rk3036_codec_dapm_controls), + .dapm_routes = rk3036_codec_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rk3036_codec_dapm_routes), + .dapm_widgets = rk3036_codec_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rk3036_codec_dapm_widgets), + }, }; static const struct regmap_config rk3036_codec_regmap_config = { From 054ea6c9e3d240a6679458c6e6e1ecf4031271ea Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:01:11 +0000 Subject: [PATCH 046/162] ASoC: codec duplicated callback function goes to component on gtm601 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/gtm601.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/gtm601.c b/sound/soc/codecs/gtm601.c index 0b80052996d3..926b1a4e37d4 100644 --- a/sound/soc/codecs/gtm601.c +++ b/sound/soc/codecs/gtm601.c @@ -52,10 +52,12 @@ static struct snd_soc_dai_driver gtm601_dai = { }; static const struct snd_soc_codec_driver soc_codec_dev_gtm601 = { - .dapm_widgets = gtm601_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(gtm601_dapm_widgets), - .dapm_routes = gtm601_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(gtm601_dapm_routes), + .component_driver = { + .dapm_widgets = gtm601_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(gtm601_dapm_widgets), + .dapm_routes = gtm601_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(gtm601_dapm_routes), + }, }; static int gtm601_platform_probe(struct platform_device *pdev) From 87869e4fadcaf6f4eac48bfb4a417720af8325a0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:01:30 +0000 Subject: [PATCH 047/162] ASoC: codec duplicated callback function goes to component on es8328 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/es8328.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c index 2086d7107622..37722194b107 100644 --- a/sound/soc/codecs/es8328.c +++ b/sound/soc/codecs/es8328.c @@ -823,12 +823,14 @@ static struct snd_soc_codec_driver es8328_codec_driver = { .set_bias_level = es8328_set_bias_level, .suspend_bias_off = true, - .controls = es8328_snd_controls, - .num_controls = ARRAY_SIZE(es8328_snd_controls), - .dapm_widgets = es8328_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(es8328_dapm_widgets), - .dapm_routes = es8328_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(es8328_dapm_routes), + .component_driver = { + .controls = es8328_snd_controls, + .num_controls = ARRAY_SIZE(es8328_snd_controls), + .dapm_widgets = es8328_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(es8328_dapm_widgets), + .dapm_routes = es8328_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(es8328_dapm_routes), + }, }; int es8328_probe(struct device *dev, struct regmap *regmap) From cbe5cdbf0e07ea563def6dda7acc6d95817949a5 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:01:49 +0000 Subject: [PATCH 048/162] ASoC: codec duplicated callback function goes to component on cs53l30 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs53l30.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c index 2c0d9c430a8c..e244e08b7da1 100644 --- a/sound/soc/codecs/cs53l30.c +++ b/sound/soc/codecs/cs53l30.c @@ -897,13 +897,14 @@ static struct snd_soc_codec_driver cs53l30_driver = { .set_bias_level = cs53l30_set_bias_level, .idle_bias_off = true, - .dapm_widgets = cs53l30_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs53l30_dapm_widgets), - .dapm_routes = cs53l30_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(cs53l30_dapm_routes), - - .controls = cs53l30_snd_controls, - .num_controls = ARRAY_SIZE(cs53l30_snd_controls), + .component_driver = { + .controls = cs53l30_snd_controls, + .num_controls = ARRAY_SIZE(cs53l30_snd_controls), + .dapm_widgets = cs53l30_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs53l30_dapm_widgets), + .dapm_routes = cs53l30_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(cs53l30_dapm_routes), + }, }; static struct regmap_config cs53l30_regmap = { From b9835ec4a7ebf508cea5e2b5955b830db0fffc5f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:02:09 +0000 Subject: [PATCH 049/162] ASoC: codec duplicated callback function goes to component on cs4349 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs4349.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c index 0ac8fc5ed4ae..231ca935cdf3 100644 --- a/sound/soc/codecs/cs4349.c +++ b/sound/soc/codecs/cs4349.c @@ -256,13 +256,14 @@ static struct snd_soc_dai_driver cs4349_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_cs4349 = { - .controls = cs4349_snd_controls, - .num_controls = ARRAY_SIZE(cs4349_snd_controls), - - .dapm_widgets = cs4349_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs4349_dapm_widgets), - .dapm_routes = cs4349_routes, - .num_dapm_routes = ARRAY_SIZE(cs4349_routes), + .component_driver = { + .controls = cs4349_snd_controls, + .num_controls = ARRAY_SIZE(cs4349_snd_controls), + .dapm_widgets = cs4349_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs4349_dapm_widgets), + .dapm_routes = cs4349_routes, + .num_dapm_routes = ARRAY_SIZE(cs4349_routes), + }, }; static const struct regmap_config cs4349_regmap = { From 4d7ee73707ec0b3759039a1d573f7829f94046e7 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:02:28 +0000 Subject: [PATCH 050/162] ASoC: codec duplicated callback function goes to component on cs42xx8 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs42xx8.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c index 1179101b2b05..b4d87379d2bc 100644 --- a/sound/soc/codecs/cs42xx8.c +++ b/sound/soc/codecs/cs42xx8.c @@ -411,12 +411,14 @@ static const struct snd_soc_codec_driver cs42xx8_driver = { .probe = cs42xx8_codec_probe, .idle_bias_off = true, - .controls = cs42xx8_snd_controls, - .num_controls = ARRAY_SIZE(cs42xx8_snd_controls), - .dapm_widgets = cs42xx8_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs42xx8_dapm_widgets), - .dapm_routes = cs42xx8_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(cs42xx8_dapm_routes), + .component_driver = { + .controls = cs42xx8_snd_controls, + .num_controls = ARRAY_SIZE(cs42xx8_snd_controls), + .dapm_widgets = cs42xx8_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs42xx8_dapm_widgets), + .dapm_routes = cs42xx8_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(cs42xx8_dapm_routes), + }, }; const struct cs42xx8_driver_data cs42448_data = { From 951cd7e6ffda4dc86ed6fb6ff10e0ca8f3b67c2b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:02:48 +0000 Subject: [PATCH 051/162] ASoC: codec duplicated callback function goes to component on cs42l73 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs42l73.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 42a8fd4e1f9b..01b573ab7036 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1257,13 +1257,14 @@ static const struct snd_soc_codec_driver soc_codec_dev_cs42l73 = { .set_bias_level = cs42l73_set_bias_level, .suspend_bias_off = true, - .dapm_widgets = cs42l73_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs42l73_dapm_widgets), - .dapm_routes = cs42l73_audio_map, - .num_dapm_routes = ARRAY_SIZE(cs42l73_audio_map), - - .controls = cs42l73_snd_controls, - .num_controls = ARRAY_SIZE(cs42l73_snd_controls), + .component_driver = { + .controls = cs42l73_snd_controls, + .num_controls = ARRAY_SIZE(cs42l73_snd_controls), + .dapm_widgets = cs42l73_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs42l73_dapm_widgets), + .dapm_routes = cs42l73_audio_map, + .num_dapm_routes = ARRAY_SIZE(cs42l73_audio_map), + }, }; static const struct regmap_config cs42l73_regmap = { From 561828f821c95c73177e5291e5831b909b400450 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:03:06 +0000 Subject: [PATCH 052/162] ASoC: codec duplicated callback function goes to component on cs42l56 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs42l56.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index eec1ff853b98..54c1768bc818 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c @@ -1121,13 +1121,14 @@ static const struct snd_soc_codec_driver soc_codec_dev_cs42l56 = { .set_bias_level = cs42l56_set_bias_level, .suspend_bias_off = true, - .dapm_widgets = cs42l56_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs42l56_dapm_widgets), - .dapm_routes = cs42l56_audio_map, - .num_dapm_routes = ARRAY_SIZE(cs42l56_audio_map), - - .controls = cs42l56_snd_controls, - .num_controls = ARRAY_SIZE(cs42l56_snd_controls), + .component_driver = { + .controls = cs42l56_snd_controls, + .num_controls = ARRAY_SIZE(cs42l56_snd_controls), + .dapm_widgets = cs42l56_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs42l56_dapm_widgets), + .dapm_routes = cs42l56_audio_map, + .num_dapm_routes = ARRAY_SIZE(cs42l56_audio_map), + }, }; static const struct regmap_config cs42l56_regmap = { From 59aad18c027669bccfe6b3334c03dbec42c74a7d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:03:26 +0000 Subject: [PATCH 053/162] ASoC: codec duplicated callback function goes to component on cs42l52 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs42l52.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 47b97fcefb0b..0d9c4a57301b 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -1056,13 +1056,14 @@ static const struct snd_soc_codec_driver soc_codec_dev_cs42l52 = { .set_bias_level = cs42l52_set_bias_level, .suspend_bias_off = true, - .dapm_widgets = cs42l52_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs42l52_dapm_widgets), - .dapm_routes = cs42l52_audio_map, - .num_dapm_routes = ARRAY_SIZE(cs42l52_audio_map), - - .controls = cs42l52_snd_controls, - .num_controls = ARRAY_SIZE(cs42l52_snd_controls), + .component_driver = { + .controls = cs42l52_snd_controls, + .num_controls = ARRAY_SIZE(cs42l52_snd_controls), + .dapm_widgets = cs42l52_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs42l52_dapm_widgets), + .dapm_routes = cs42l52_audio_map, + .num_dapm_routes = ARRAY_SIZE(cs42l52_audio_map), + }, }; /* Current and threshold powerup sequence Pg37 */ From 9353d25dc8442784b1bc626cb2741965a1f53dad Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:03:45 +0000 Subject: [PATCH 054/162] ASoC: codec duplicated callback function goes to component on cs42l51 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs42l51.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 35488f14e237..96cfe38943cd 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -507,12 +507,14 @@ static int cs42l51_codec_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver soc_codec_device_cs42l51 = { .probe = cs42l51_codec_probe, - .controls = cs42l51_snd_controls, - .num_controls = ARRAY_SIZE(cs42l51_snd_controls), - .dapm_widgets = cs42l51_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs42l51_dapm_widgets), - .dapm_routes = cs42l51_routes, - .num_dapm_routes = ARRAY_SIZE(cs42l51_routes), + .component_driver = { + .controls = cs42l51_snd_controls, + .num_controls = ARRAY_SIZE(cs42l51_snd_controls), + .dapm_widgets = cs42l51_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs42l51_dapm_widgets), + .dapm_routes = cs42l51_routes, + .num_dapm_routes = ARRAY_SIZE(cs42l51_routes), + }, }; const struct regmap_config cs42l51_regmap = { From 228a57aea80b5dfc4624ad29952a8168317a1884 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:04:04 +0000 Subject: [PATCH 055/162] ASoC: codec duplicated callback function goes to component on cs4271 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs4271.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 0c0010b25421..8c0f3b89b5bc 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -645,12 +645,14 @@ static struct snd_soc_codec_driver soc_codec_dev_cs4271 = { .suspend = cs4271_soc_suspend, .resume = cs4271_soc_resume, - .controls = cs4271_snd_controls, - .num_controls = ARRAY_SIZE(cs4271_snd_controls), - .dapm_widgets = cs4271_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs4271_dapm_widgets), - .dapm_routes = cs4271_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes), + .component_driver = { + .controls = cs4271_snd_controls, + .num_controls = ARRAY_SIZE(cs4271_snd_controls), + .dapm_widgets = cs4271_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs4271_dapm_widgets), + .dapm_routes = cs4271_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes), + }, }; static int cs4271_common_probe(struct device *dev, From f80894338e8793821f96db179cfc349d8057ffbc Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:04:25 +0000 Subject: [PATCH 056/162] ASoC: codec duplicated callback function goes to component on cs4270 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs4270.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index e07807d96b68..18baea2f7d65 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -617,12 +617,14 @@ static const struct snd_soc_codec_driver soc_codec_device_cs4270 = { .suspend = cs4270_soc_suspend, .resume = cs4270_soc_resume, - .controls = cs4270_snd_controls, - .num_controls = ARRAY_SIZE(cs4270_snd_controls), - .dapm_widgets = cs4270_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs4270_dapm_widgets), - .dapm_routes = cs4270_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(cs4270_dapm_routes), + .component_driver = { + .controls = cs4270_snd_controls, + .num_controls = ARRAY_SIZE(cs4270_snd_controls), + .dapm_widgets = cs4270_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs4270_dapm_widgets), + .dapm_routes = cs4270_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(cs4270_dapm_routes), + }, }; /* From 9f9dc779bca7eb24f0afc8929bf89a4c5cccccea Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:04:43 +0000 Subject: [PATCH 057/162] ASoC: codec duplicated callback function goes to component on cs4265 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs4265.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index 55db19ddc5ff..fd966bb851cb 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c @@ -547,13 +547,14 @@ static struct snd_soc_dai_driver cs4265_dai[] = { static const struct snd_soc_codec_driver soc_codec_cs4265 = { .set_bias_level = cs4265_set_bias_level, - .dapm_widgets = cs4265_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs4265_dapm_widgets), - .dapm_routes = cs4265_audio_map, - .num_dapm_routes = ARRAY_SIZE(cs4265_audio_map), - - .controls = cs4265_snd_controls, - .num_controls = ARRAY_SIZE(cs4265_snd_controls), + .component_driver = { + .controls = cs4265_snd_controls, + .num_controls = ARRAY_SIZE(cs4265_snd_controls), + .dapm_widgets = cs4265_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs4265_dapm_widgets), + .dapm_routes = cs4265_audio_map, + .num_dapm_routes = ARRAY_SIZE(cs4265_audio_map), + }, }; static const struct regmap_config cs4265_regmap = { From 133987d66418f09c1d9b010a4a6ae67fdd2d6214 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:05:00 +0000 Subject: [PATCH 058/162] ASoC: codec duplicated callback function goes to component on cs35l33 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs35l33.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c index 6f9c1addcd7f..6df29fa30fb9 100644 --- a/sound/soc/codecs/cs35l33.c +++ b/sound/soc/codecs/cs35l33.c @@ -837,13 +837,14 @@ static struct snd_soc_codec_driver soc_codec_dev_cs35l33 = { .set_bias_level = cs35l33_set_bias_level, .set_sysclk = cs35l33_codec_set_sysclk, - .dapm_widgets = cs35l33_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs35l33_dapm_widgets), - .dapm_routes = cs35l33_audio_map, - .num_dapm_routes = ARRAY_SIZE(cs35l33_audio_map), - .controls = cs35l33_snd_controls, - .num_controls = ARRAY_SIZE(cs35l33_snd_controls), - + .component_driver = { + .controls = cs35l33_snd_controls, + .num_controls = ARRAY_SIZE(cs35l33_snd_controls), + .dapm_widgets = cs35l33_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs35l33_dapm_widgets), + .dapm_routes = cs35l33_audio_map, + .num_dapm_routes = ARRAY_SIZE(cs35l33_audio_map), + }, .idle_bias_off = true, }; From 1728f9d11f234df10c392f41a0ec80be287c4567 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:05:18 +0000 Subject: [PATCH 059/162] ASoC: codec duplicated callback function goes to component on cs35l32 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs35l32.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c index 287d13740be4..7e9806206648 100644 --- a/sound/soc/codecs/cs35l32.c +++ b/sound/soc/codecs/cs35l32.c @@ -231,13 +231,14 @@ static int cs35l32_codec_set_sysclk(struct snd_soc_codec *codec, static const struct snd_soc_codec_driver soc_codec_dev_cs35l32 = { .set_sysclk = cs35l32_codec_set_sysclk, - .dapm_widgets = cs35l32_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs35l32_dapm_widgets), - .dapm_routes = cs35l32_audio_map, - .num_dapm_routes = ARRAY_SIZE(cs35l32_audio_map), - - .controls = cs35l32_snd_controls, - .num_controls = ARRAY_SIZE(cs35l32_snd_controls), + .component_driver = { + .controls = cs35l32_snd_controls, + .num_controls = ARRAY_SIZE(cs35l32_snd_controls), + .dapm_widgets = cs35l32_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs35l32_dapm_widgets), + .dapm_routes = cs35l32_audio_map, + .num_dapm_routes = ARRAY_SIZE(cs35l32_audio_map), + }, }; /* Current and threshold powerup sequence Pg37 in datasheet */ From 24fe48d78be574dcd43bc5156f47d37757cfffbd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:05:36 +0000 Subject: [PATCH 060/162] ASoC: codec duplicated callback function goes to component on bt-sco codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/bt-sco.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/bt-sco.c b/sound/soc/codecs/bt-sco.c index 2a8d0ee141d4..8014e697d540 100644 --- a/sound/soc/codecs/bt-sco.c +++ b/sound/soc/codecs/bt-sco.c @@ -63,10 +63,12 @@ static struct snd_soc_dai_driver bt_sco_dai[] = { }; static struct snd_soc_codec_driver soc_codec_dev_bt_sco = { - .dapm_widgets = bt_sco_widgets, - .num_dapm_widgets = ARRAY_SIZE(bt_sco_widgets), - .dapm_routes = bt_sco_routes, - .num_dapm_routes = ARRAY_SIZE(bt_sco_routes), + .component_driver = { + .dapm_widgets = bt_sco_widgets, + .num_dapm_widgets = ARRAY_SIZE(bt_sco_widgets), + .dapm_routes = bt_sco_routes, + .num_dapm_routes = ARRAY_SIZE(bt_sco_routes), + }, }; static int bt_sco_probe(struct platform_device *pdev) From 5bc4f738018ddcb86b7ac5894d4a9e416dbb65b0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:05:56 +0000 Subject: [PATCH 061/162] ASoC: codec duplicated callback function goes to component on ak5386 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak5386.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ak5386.c b/sound/soc/codecs/ak5386.c index afa95360826d..0ef2df223336 100644 --- a/sound/soc/codecs/ak5386.c +++ b/sound/soc/codecs/ak5386.c @@ -74,10 +74,12 @@ static struct snd_soc_codec_driver soc_codec_ak5386 = { .remove = ak5386_soc_remove, .suspend = ak5386_soc_suspend, .resume = ak5386_soc_resume, - .dapm_widgets = ak5386_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak5386_dapm_widgets), - .dapm_routes = ak5386_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ak5386_dapm_routes), + .component_driver = { + .dapm_widgets = ak5386_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak5386_dapm_widgets), + .dapm_routes = ak5386_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ak5386_dapm_routes), + }, }; static int ak5386_set_dai_fmt(struct snd_soc_dai *codec_dai, From 3a6ce00e2a5b85d558f051b709be9d1952bd7461 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:06:14 +0000 Subject: [PATCH 062/162] ASoC: codec duplicated callback function goes to component on ak4642 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak4642.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index cc941d66ec3d..2609f95b7d19 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c @@ -555,12 +555,14 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4642 = { .suspend = ak4642_suspend, .resume = ak4642_resume, .set_bias_level = ak4642_set_bias_level, - .controls = ak4642_snd_controls, - .num_controls = ARRAY_SIZE(ak4642_snd_controls), - .dapm_widgets = ak4642_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak4642_dapm_widgets), - .dapm_routes = ak4642_intercon, - .num_dapm_routes = ARRAY_SIZE(ak4642_intercon), + .component_driver = { + .controls = ak4642_snd_controls, + .num_controls = ARRAY_SIZE(ak4642_snd_controls), + .dapm_widgets = ak4642_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4642_dapm_widgets), + .dapm_routes = ak4642_intercon, + .num_dapm_routes = ARRAY_SIZE(ak4642_intercon), + }, }; static const struct regmap_config ak4642_regmap = { From beb84f75c4d9d069172f32543544d757d59e114b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:06:34 +0000 Subject: [PATCH 063/162] ASoC: codec duplicated callback function goes to component on ak4613 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak4613.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index 97798d250f08..e819dd8c82fd 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -458,12 +458,14 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4613 = { .suspend = ak4613_suspend, .resume = ak4613_resume, .set_bias_level = ak4613_set_bias_level, - .controls = ak4613_snd_controls, - .num_controls = ARRAY_SIZE(ak4613_snd_controls), - .dapm_widgets = ak4613_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak4613_dapm_widgets), - .dapm_routes = ak4613_intercon, - .num_dapm_routes = ARRAY_SIZE(ak4613_intercon), + .component_driver = { + .controls = ak4613_snd_controls, + .num_controls = ARRAY_SIZE(ak4613_snd_controls), + .dapm_widgets = ak4613_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4613_dapm_widgets), + .dapm_routes = ak4613_intercon, + .num_dapm_routes = ARRAY_SIZE(ak4613_intercon), + }, }; static void ak4613_parse_of(struct ak4613_priv *priv, From 08c0ca5ebd361420d40a4c6970e3dd1a4c64306a Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:06:52 +0000 Subject: [PATCH 064/162] ASoC: codec duplicated callback function goes to component on ak4554 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak4554.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c index 298dedc05140..b92c548b9d29 100644 --- a/sound/soc/codecs/ak4554.c +++ b/sound/soc/codecs/ak4554.c @@ -65,10 +65,12 @@ static struct snd_soc_dai_driver ak4554_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_ak4554 = { - .dapm_widgets = ak4554_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak4554_dapm_widgets), - .dapm_routes = ak4554_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ak4554_dapm_routes), + .component_driver = { + .dapm_widgets = ak4554_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4554_dapm_widgets), + .dapm_routes = ak4554_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ak4554_dapm_routes), + }, }; static int ak4554_soc_probe(struct platform_device *pdev) From 1cd5e361736664302285850a327d52ef7f70e74a Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:07:11 +0000 Subject: [PATCH 065/162] ASoC: codec duplicated callback function goes to component on ak4104 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak4104.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index 595d02d7602c..bdca8793e630 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c @@ -245,10 +245,12 @@ static struct snd_soc_codec_driver soc_codec_device_ak4104 = { .suspend = ak4104_soc_suspend, .resume = ak4104_soc_resume, - .dapm_widgets = ak4104_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak4104_dapm_widgets), - .dapm_routes = ak4104_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ak4104_dapm_routes), + .component_driver = { + .dapm_widgets = ak4104_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4104_dapm_widgets), + .dapm_routes = ak4104_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ak4104_dapm_routes), + } }; static const struct regmap_config ak4104_regmap = { From 7d9477e8e3f2ef6c8ca8103cca6fe9dbef300cd4 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:07:29 +0000 Subject: [PATCH 066/162] ASoC: codec duplicated callback function goes to component on adau7002 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/adau7002.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/adau7002.c b/sound/soc/codecs/adau7002.c index 9df72c6adcca..6384c5491de8 100644 --- a/sound/soc/codecs/adau7002.c +++ b/sound/soc/codecs/adau7002.c @@ -39,10 +39,12 @@ static struct snd_soc_dai_driver adau7002_dai = { }; static const struct snd_soc_codec_driver adau7002_codec_driver = { - .dapm_widgets = adau7002_widgets, - .num_dapm_widgets = ARRAY_SIZE(adau7002_widgets), - .dapm_routes = adau7002_routes, - .num_dapm_routes = ARRAY_SIZE(adau7002_routes), + .component_driver = { + .dapm_widgets = adau7002_widgets, + .num_dapm_widgets = ARRAY_SIZE(adau7002_widgets), + .dapm_routes = adau7002_routes, + .num_dapm_routes = ARRAY_SIZE(adau7002_routes), + }, }; static int adau7002_probe(struct platform_device *pdev) From 637591ecb4468c55489654b698319adb9fbfbe36 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:07:47 +0000 Subject: [PATCH 067/162] ASoC: codec duplicated callback function goes to component on adau1701 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/adau1701.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index de53c0d7bf10..3bad1bc8c00a 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c @@ -765,13 +765,14 @@ static struct snd_soc_codec_driver adau1701_codec_drv = { .set_bias_level = adau1701_set_bias_level, .idle_bias_off = true, - .controls = adau1701_controls, - .num_controls = ARRAY_SIZE(adau1701_controls), - .dapm_widgets = adau1701_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(adau1701_dapm_widgets), - .dapm_routes = adau1701_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(adau1701_dapm_routes), - + .component_driver = { + .controls = adau1701_controls, + .num_controls = ARRAY_SIZE(adau1701_controls), + .dapm_widgets = adau1701_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(adau1701_dapm_widgets), + .dapm_routes = adau1701_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(adau1701_dapm_routes), + }, .set_sysclk = adau1701_set_sysclk, }; From eab73d01f6e3cb484280807be570e75734fca696 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:08:06 +0000 Subject: [PATCH 068/162] ASoC: codec duplicated callback function goes to component on ac97 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ac97.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 5b3224c63943..f7f04c6be01e 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -117,10 +117,12 @@ static struct snd_soc_codec_driver soc_codec_dev_ac97 = { .suspend = ac97_soc_suspend, .resume = ac97_soc_resume, - .dapm_widgets = ac97_widgets, - .num_dapm_widgets = ARRAY_SIZE(ac97_widgets), - .dapm_routes = ac97_routes, - .num_dapm_routes = ARRAY_SIZE(ac97_routes), + .component_driver = { + .dapm_widgets = ac97_widgets, + .num_dapm_widgets = ARRAY_SIZE(ac97_widgets), + .dapm_routes = ac97_routes, + .num_dapm_routes = ARRAY_SIZE(ac97_routes), + }, }; static int ac97_probe(struct platform_device *pdev) From 05a0d2d497f91aa9657842484043c08e5aed8eb3 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:08:24 +0000 Subject: [PATCH 069/162] ASoC: codec duplicated callback function goes to component on ad1980 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ad1980.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c index 9ef20dbccbe3..b7c1b9f4bf5f 100644 --- a/sound/soc/codecs/ad1980.c +++ b/sound/soc/codecs/ad1980.c @@ -299,12 +299,14 @@ static struct snd_soc_codec_driver soc_codec_dev_ad1980 = { .probe = ad1980_soc_probe, .remove = ad1980_soc_remove, - .controls = ad1980_snd_ac97_controls, - .num_controls = ARRAY_SIZE(ad1980_snd_ac97_controls), - .dapm_widgets = ad1980_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ad1980_dapm_widgets), - .dapm_routes = ad1980_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ad1980_dapm_routes), + .component_driver = { + .controls = ad1980_snd_ac97_controls, + .num_controls = ARRAY_SIZE(ad1980_snd_ac97_controls), + .dapm_widgets = ad1980_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ad1980_dapm_widgets), + .dapm_routes = ad1980_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ad1980_dapm_routes), + }, }; static int ad1980_probe(struct platform_device *pdev) From f95b81387cac798cf790b47cbb676e0fd8f87a6d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:08:46 +0000 Subject: [PATCH 070/162] ASoC: codec duplicated callback function goes to component on ad73311 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ad73311.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ad73311.c b/sound/soc/codecs/ad73311.c index a9400aef60b5..3e358a49442d 100644 --- a/sound/soc/codecs/ad73311.c +++ b/sound/soc/codecs/ad73311.c @@ -55,10 +55,12 @@ static struct snd_soc_dai_driver ad73311_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_ad73311 = { - .dapm_widgets = ad73311_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ad73311_dapm_widgets), - .dapm_routes = ad73311_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ad73311_dapm_routes), + .component_driver = { + .dapm_widgets = ad73311_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ad73311_dapm_widgets), + .dapm_routes = ad73311_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ad73311_dapm_routes), + }, }; static int ad73311_probe(struct platform_device *pdev) From adfe0976aadb618acf130564d39e39ec0b0a5b90 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:09:04 +0000 Subject: [PATCH 071/162] ASoC: codec duplicated callback function goes to component on adau1373 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/adau1373.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c index 1556b360fa15..8fa9045571ff 100644 --- a/sound/soc/codecs/adau1373.c +++ b/sound/soc/codecs/adau1373.c @@ -1466,12 +1466,14 @@ static struct snd_soc_codec_driver adau1373_codec_driver = { .set_pll = adau1373_set_pll, - .controls = adau1373_controls, - .num_controls = ARRAY_SIZE(adau1373_controls), - .dapm_widgets = adau1373_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(adau1373_dapm_widgets), - .dapm_routes = adau1373_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(adau1373_dapm_routes), + .component_driver = { + .controls = adau1373_controls, + .num_controls = ARRAY_SIZE(adau1373_controls), + .dapm_widgets = adau1373_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(adau1373_dapm_widgets), + .dapm_routes = adau1373_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(adau1373_dapm_routes), + }, }; static int adau1373_i2c_probe(struct i2c_client *client, From 8a04dd67a380384549f6553049fd6c69ae0447ee Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:09:21 +0000 Subject: [PATCH 072/162] ASoC: codec duplicated callback function goes to component on ad1836 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ad1836.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index e2ce6c4d7ece..a478239aadac 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c @@ -327,12 +327,14 @@ static struct snd_soc_codec_driver soc_codec_dev_ad1836 = { .suspend = ad1836_suspend, .resume = ad1836_resume, - .controls = ad183x_controls, - .num_controls = ARRAY_SIZE(ad183x_controls), - .dapm_widgets = ad183x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ad183x_dapm_widgets), - .dapm_routes = ad183x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ad183x_dapm_routes), + .component_driver = { + .controls = ad183x_controls, + .num_controls = ARRAY_SIZE(ad183x_controls), + .dapm_widgets = ad183x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ad183x_dapm_widgets), + .dapm_routes = ad183x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ad183x_dapm_routes), + }, }; static const struct reg_default ad1836_reg_defaults[] = { From 1d09e8c35626ea0b899c1cd1922d8802bd169868 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:09:43 +0000 Subject: [PATCH 073/162] ASoC: codec duplicated callback function goes to component on ad193x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ad193x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c index 3a3f3f2343d7..d643557d89a7 100644 --- a/sound/soc/codecs/ad193x.c +++ b/sound/soc/codecs/ad193x.c @@ -410,12 +410,14 @@ static int ad193x_codec_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver soc_codec_dev_ad193x = { .probe = ad193x_codec_probe, - .controls = ad193x_snd_controls, - .num_controls = ARRAY_SIZE(ad193x_snd_controls), - .dapm_widgets = ad193x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ad193x_dapm_widgets), - .dapm_routes = audio_paths, - .num_dapm_routes = ARRAY_SIZE(audio_paths), + .component_driver = { + .controls = ad193x_snd_controls, + .num_controls = ARRAY_SIZE(ad193x_snd_controls), + .dapm_widgets = ad193x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ad193x_dapm_widgets), + .dapm_routes = audio_paths, + .num_dapm_routes = ARRAY_SIZE(audio_paths), + }, }; const struct regmap_config ad193x_regmap_config = { From 33398b509aafe936ec57cb1023f7ff1ba9e48586 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:10:02 +0000 Subject: [PATCH 074/162] ASoC: codec duplicated callback function goes to component on 88pm860x-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/88pm860x-codec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index e8bed6b0c9db..b013a4c62b63 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c @@ -1361,12 +1361,14 @@ static struct snd_soc_codec_driver soc_codec_dev_pm860x = { .set_bias_level = pm860x_set_bias_level, .get_regmap = pm860x_get_regmap, - .controls = pm860x_snd_controls, - .num_controls = ARRAY_SIZE(pm860x_snd_controls), - .dapm_widgets = pm860x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(pm860x_dapm_widgets), - .dapm_routes = pm860x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(pm860x_dapm_routes), + .component_driver = { + .controls = pm860x_snd_controls, + .num_controls = ARRAY_SIZE(pm860x_snd_controls), + .dapm_widgets = pm860x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(pm860x_dapm_widgets), + .dapm_routes = pm860x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(pm860x_dapm_routes), + }, }; static int pm860x_codec_probe(struct platform_device *pdev) From 69295df090a03e406c54ca0dbd67a76355773138 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:10:21 +0000 Subject: [PATCH 075/162] ASoC: codec duplicated callback function goes to component on atmel-classd codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/atmel/atmel-classd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 6d9b8b44e2da..89ac5f5a93eb 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -308,9 +308,11 @@ static struct regmap *atmel_classd_codec_get_remap(struct device *dev) static struct snd_soc_codec_driver soc_codec_dev_classd = { .probe = atmel_classd_codec_probe, - .controls = atmel_classd_snd_controls, - .num_controls = ARRAY_SIZE(atmel_classd_snd_controls), .get_regmap = atmel_classd_codec_get_remap, + .component_driver = { + .controls = atmel_classd_snd_controls, + .num_controls = ARRAY_SIZE(atmel_classd_snd_controls), + }, }; /* codec dai component */ From 72bb3cdf93b1718c9a540fb157890d8639633eca Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:10:41 +0000 Subject: [PATCH 076/162] ASoC: codec duplicated callback function goes to component on atmel-pdmic codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/atmel/atmel-pdmic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index 5f56da60c92f..2a3a41fad38d 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -357,8 +357,10 @@ static int atmel_pdmic_codec_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver soc_codec_dev_pdmic = { .probe = atmel_pdmic_codec_probe, - .controls = atmel_pdmic_snd_controls, - .num_controls = ARRAY_SIZE(atmel_pdmic_snd_controls), + .component_driver = { + .controls = atmel_pdmic_snd_controls, + .num_controls = ARRAY_SIZE(atmel_pdmic_snd_controls), + }, }; /* codec dai component */ From ed135dd69556c70fb780985c536cc650e7f7b450 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:10:59 +0000 Subject: [PATCH 077/162] ASoC: codec duplicated callback function goes to component on ab8500-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ab8500-codec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 2fc89155f14a..3056487ed5a9 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -2525,12 +2525,14 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver ab8500_codec_driver = { .probe = ab8500_codec_probe, - .controls = ab8500_ctrls, - .num_controls = ARRAY_SIZE(ab8500_ctrls), - .dapm_widgets = ab8500_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ab8500_dapm_widgets), - .dapm_routes = ab8500_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ab8500_dapm_routes), + .component_driver = { + .controls = ab8500_ctrls, + .num_controls = ARRAY_SIZE(ab8500_ctrls), + .dapm_widgets = ab8500_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ab8500_dapm_widgets), + .dapm_routes = ab8500_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ab8500_dapm_routes), + }, }; static int ab8500_codec_driver_probe(struct platform_device *pdev) From c30ca68b9a8625e93c218374bad63c6babe85e3a Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:11:18 +0000 Subject: [PATCH 078/162] ASoC: codec duplicated callback function goes to component on adau1761 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/adau1761.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/adau1761.c b/sound/soc/codecs/adau1761.c index b95d29dbd13d..3bc3cc559dde 100644 --- a/sound/soc/codecs/adau1761.c +++ b/sound/soc/codecs/adau1761.c @@ -719,12 +719,14 @@ static const struct snd_soc_codec_driver adau1761_codec_driver = { .set_bias_level = adau1761_set_bias_level, .suspend_bias_off = true, - .controls = adau1761_controls, - .num_controls = ARRAY_SIZE(adau1761_controls), - .dapm_widgets = adau1x61_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(adau1x61_dapm_widgets), - .dapm_routes = adau1x61_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(adau1x61_dapm_routes), + .component_driver = { + .controls = adau1761_controls, + .num_controls = ARRAY_SIZE(adau1761_controls), + .dapm_widgets = adau1x61_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(adau1x61_dapm_widgets), + .dapm_routes = adau1x61_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(adau1x61_dapm_routes), + }, }; #define ADAU1761_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | \ From dbd33b16d68bf3ff93fb7965a2e87878ee091e94 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:11:36 +0000 Subject: [PATCH 079/162] ASoC: codec duplicated callback function goes to component on adau1781 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/adau1781.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/adau1781.c b/sound/soc/codecs/adau1781.c index bc1bb56dae63..546071c6c0d0 100644 --- a/sound/soc/codecs/adau1781.c +++ b/sound/soc/codecs/adau1781.c @@ -432,12 +432,14 @@ static const struct snd_soc_codec_driver adau1781_codec_driver = { .set_bias_level = adau1781_set_bias_level, .suspend_bias_off = true, - .controls = adau1781_controls, - .num_controls = ARRAY_SIZE(adau1781_controls), - .dapm_widgets = adau1781_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(adau1781_dapm_widgets), - .dapm_routes = adau1781_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(adau1781_dapm_routes), + .component_driver = { + .controls = adau1781_controls, + .num_controls = ARRAY_SIZE(adau1781_controls), + .dapm_widgets = adau1781_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(adau1781_dapm_widgets), + .dapm_routes = adau1781_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(adau1781_dapm_routes), + }, }; #define ADAU1781_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | \ From ef611e1f4ad7c0355a2aa97660210bfa4a4472c4 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:11:55 +0000 Subject: [PATCH 080/162] ASoC: codec duplicated callback function goes to component on adau1977 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/adau1977.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c index 9bdd15f408c1..b319db6a69f8 100644 --- a/sound/soc/codecs/adau1977.c +++ b/sound/soc/codecs/adau1977.c @@ -873,12 +873,14 @@ static struct snd_soc_codec_driver adau1977_codec_driver = { .set_sysclk = adau1977_set_sysclk, .idle_bias_off = true, - .controls = adau1977_snd_controls, - .num_controls = ARRAY_SIZE(adau1977_snd_controls), - .dapm_widgets = adau1977_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(adau1977_dapm_widgets), - .dapm_routes = adau1977_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(adau1977_dapm_routes), + .component_driver = { + .controls = adau1977_snd_controls, + .num_controls = ARRAY_SIZE(adau1977_snd_controls), + .dapm_widgets = adau1977_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(adau1977_dapm_widgets), + .dapm_routes = adau1977_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(adau1977_dapm_routes), + }, }; static int adau1977_setup_micbias(struct adau1977 *adau1977) From c5946fcf84bf71f4c0bc08a6bce3781e6b281737 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:12:11 +0000 Subject: [PATCH 081/162] ASoC: codec duplicated callback function goes to component on adav80x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/adav80x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index acff8d62059c..6e793ebb5883 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c @@ -834,12 +834,14 @@ static struct snd_soc_codec_driver adav80x_codec_driver = { .set_pll = adav80x_set_pll, .set_sysclk = adav80x_set_sysclk, - .controls = adav80x_controls, - .num_controls = ARRAY_SIZE(adav80x_controls), - .dapm_widgets = adav80x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(adav80x_dapm_widgets), - .dapm_routes = adav80x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(adav80x_dapm_routes), + .component_driver = { + .controls = adav80x_controls, + .num_controls = ARRAY_SIZE(adav80x_controls), + .dapm_widgets = adav80x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(adav80x_dapm_widgets), + .dapm_routes = adav80x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(adav80x_dapm_routes), + }, }; int adav80x_bus_probe(struct device *dev, struct regmap *regmap) From 940b816f905eddf6c61db150b4833cd0c7eb61d8 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:12:30 +0000 Subject: [PATCH 082/162] ASoC: codec duplicated callback function goes to component on ads117x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ads117x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c index c5be1bdc2c9a..90c756d183b4 100644 --- a/sound/soc/codecs/ads117x.c +++ b/sound/soc/codecs/ads117x.c @@ -59,10 +59,12 @@ static struct snd_soc_dai_driver ads117x_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_ads117x = { - .dapm_widgets = ads117x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ads117x_dapm_widgets), - .dapm_routes = ads117x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ads117x_dapm_routes), + .component_driver = { + .dapm_widgets = ads117x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ads117x_dapm_widgets), + .dapm_routes = ads117x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ads117x_dapm_routes), + }, }; static int ads117x_probe(struct platform_device *pdev) From 301810d0dfbcd1f56c552da6c9234db5003ec344 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:12:48 +0000 Subject: [PATCH 083/162] ASoC: codec duplicated callback function goes to component on ak4535 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak4535.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index 54428c64387b..66cfffde9a12 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c @@ -395,12 +395,14 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4535 = { .set_bias_level = ak4535_set_bias_level, .suspend_bias_off = true, - .controls = ak4535_snd_controls, - .num_controls = ARRAY_SIZE(ak4535_snd_controls), - .dapm_widgets = ak4535_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak4535_dapm_widgets), - .dapm_routes = ak4535_audio_map, - .num_dapm_routes = ARRAY_SIZE(ak4535_audio_map), + .component_driver = { + .controls = ak4535_snd_controls, + .num_controls = ARRAY_SIZE(ak4535_snd_controls), + .dapm_widgets = ak4535_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4535_dapm_widgets), + .dapm_routes = ak4535_audio_map, + .num_dapm_routes = ARRAY_SIZE(ak4535_audio_map), + }, }; static int ak4535_i2c_probe(struct i2c_client *i2c, From f303eb9e1e5d1c9c26cf85274324ce6a863da946 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:13:06 +0000 Subject: [PATCH 084/162] ASoC: codec duplicated callback function goes to component on ak4641 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak4641.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c index b14176f8d884..c91717d08513 100644 --- a/sound/soc/codecs/ak4641.c +++ b/sound/soc/codecs/ak4641.c @@ -505,12 +505,14 @@ static struct snd_soc_dai_driver ak4641_dai[] = { }; static struct snd_soc_codec_driver soc_codec_dev_ak4641 = { - .controls = ak4641_snd_controls, - .num_controls = ARRAY_SIZE(ak4641_snd_controls), - .dapm_widgets = ak4641_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak4641_dapm_widgets), - .dapm_routes = ak4641_audio_map, - .num_dapm_routes = ARRAY_SIZE(ak4641_audio_map), + .component_driver = { + .controls = ak4641_snd_controls, + .num_controls = ARRAY_SIZE(ak4641_snd_controls), + .dapm_widgets = ak4641_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4641_dapm_widgets), + .dapm_routes = ak4641_audio_map, + .num_dapm_routes = ARRAY_SIZE(ak4641_audio_map), + }, .set_bias_level = ak4641_set_bias_level, .suspend_bias_off = true, }; From af06ccaded87dc25c41714004a2d73bfeef0c922 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:13:26 +0000 Subject: [PATCH 085/162] ASoC: codec duplicated callback function goes to component on ak4671 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ak4671.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index c73a9f6914b6..6088afaabf62 100644 --- a/sound/soc/codecs/ak4671.c +++ b/sound/soc/codecs/ak4671.c @@ -612,12 +612,14 @@ static struct snd_soc_dai_driver ak4671_dai = { static struct snd_soc_codec_driver soc_codec_dev_ak4671 = { .set_bias_level = ak4671_set_bias_level, - .controls = ak4671_snd_controls, - .num_controls = ARRAY_SIZE(ak4671_snd_controls), - .dapm_widgets = ak4671_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ak4671_dapm_widgets), - .dapm_routes = ak4671_intercon, - .num_dapm_routes = ARRAY_SIZE(ak4671_intercon), + .component_driver = { + .controls = ak4671_snd_controls, + .num_controls = ARRAY_SIZE(ak4671_snd_controls), + .dapm_widgets = ak4671_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4671_dapm_widgets), + .dapm_routes = ak4671_intercon, + .num_dapm_routes = ARRAY_SIZE(ak4671_intercon), + }, }; static const struct regmap_config ak4671_regmap = { From e9474dc634c76d047be84c3dd35bf81213d2d550 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:13:44 +0000 Subject: [PATCH 086/162] ASoC: codec duplicated callback function goes to component on alc5632 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/alc5632.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c index 4d3ba33eb6f9..adb80d8719bd 100644 --- a/sound/soc/codecs/alc5632.c +++ b/sound/soc/codecs/alc5632.c @@ -1072,12 +1072,14 @@ static const struct snd_soc_codec_driver soc_codec_device_alc5632 = { .set_bias_level = alc5632_set_bias_level, .suspend_bias_off = true, - .controls = alc5632_snd_controls, - .num_controls = ARRAY_SIZE(alc5632_snd_controls), - .dapm_widgets = alc5632_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(alc5632_dapm_widgets), - .dapm_routes = alc5632_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(alc5632_dapm_routes), + .component_driver = { + .controls = alc5632_snd_controls, + .num_controls = ARRAY_SIZE(alc5632_snd_controls), + .dapm_widgets = alc5632_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(alc5632_dapm_widgets), + .dapm_routes = alc5632_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(alc5632_dapm_routes), + }, }; static const struct regmap_config alc5632_regmap = { From 295f08154cc07db27c75e0c0ac4af9890b87f85b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:14:00 +0000 Subject: [PATCH 087/162] ASoC: codec duplicated callback function goes to component on cs47l24 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cs47l24.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c index 954a4f5d3338..779a7bfff1c3 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c @@ -1190,12 +1190,14 @@ static struct snd_soc_codec_driver soc_codec_dev_cs47l24 = { .set_sysclk = arizona_set_sysclk, .set_pll = cs47l24_set_fll, - .controls = cs47l24_snd_controls, - .num_controls = ARRAY_SIZE(cs47l24_snd_controls), - .dapm_widgets = cs47l24_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cs47l24_dapm_widgets), - .dapm_routes = cs47l24_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(cs47l24_dapm_routes), + .component_driver = { + .controls = cs47l24_snd_controls, + .num_controls = ARRAY_SIZE(cs47l24_snd_controls), + .dapm_widgets = cs47l24_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs47l24_dapm_widgets), + .dapm_routes = cs47l24_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(cs47l24_dapm_routes), + }, }; static struct snd_compr_ops cs47l24_compr_ops = { From a2c9c0f9729be9b0c5d410fd3f9ba2b335d5e868 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:14:19 +0000 Subject: [PATCH 088/162] ASoC: codec duplicated callback function goes to component on cx20442 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cx20442.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index fb3885fe0afb..2c12471e42a6 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -407,10 +407,12 @@ static struct snd_soc_codec_driver cx20442_codec_dev = { .reg_word_size = sizeof(u8), .read = cx20442_read_reg_cache, .write = cx20442_write, - .dapm_widgets = cx20442_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(cx20442_dapm_widgets), - .dapm_routes = cx20442_audio_map, - .num_dapm_routes = ARRAY_SIZE(cx20442_audio_map), + .component_driver = { + .dapm_widgets = cx20442_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cx20442_dapm_widgets), + .dapm_routes = cx20442_audio_map, + .num_dapm_routes = ARRAY_SIZE(cx20442_audio_map), + }, }; static int cx20442_platform_probe(struct platform_device *pdev) From 57329a3a419273e765f5654c3c8cad9266c5b6f2 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:14:35 +0000 Subject: [PATCH 089/162] ASoC: codec duplicated callback function goes to component on da7210 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/da7210.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index af23a61b7b28..17053dfc94cf 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c @@ -1167,13 +1167,14 @@ static int da7210_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver soc_codec_dev_da7210 = { .probe = da7210_probe, - .controls = da7210_snd_controls, - .num_controls = ARRAY_SIZE(da7210_snd_controls), - - .dapm_widgets = da7210_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(da7210_dapm_widgets), - .dapm_routes = da7210_audio_map, - .num_dapm_routes = ARRAY_SIZE(da7210_audio_map), + .component_driver = { + .controls = da7210_snd_controls, + .num_controls = ARRAY_SIZE(da7210_snd_controls), + .dapm_widgets = da7210_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(da7210_dapm_widgets), + .dapm_routes = da7210_audio_map, + .num_dapm_routes = ARRAY_SIZE(da7210_audio_map), + }, }; #if IS_ENABLED(CONFIG_I2C) From 92d2a233d878c4ddebad805ae4201e8ec335b3af Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:14:53 +0000 Subject: [PATCH 090/162] ASoC: codec duplicated callback function goes to component on da7213 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/da7213.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index e5527bc570ae..7cfb5da5378d 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c @@ -1740,13 +1740,14 @@ static struct snd_soc_codec_driver soc_codec_dev_da7213 = { .probe = da7213_probe, .set_bias_level = da7213_set_bias_level, - .controls = da7213_snd_controls, - .num_controls = ARRAY_SIZE(da7213_snd_controls), - - .dapm_widgets = da7213_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(da7213_dapm_widgets), - .dapm_routes = da7213_audio_map, - .num_dapm_routes = ARRAY_SIZE(da7213_audio_map), + .component_driver = { + .controls = da7213_snd_controls, + .num_controls = ARRAY_SIZE(da7213_snd_controls), + .dapm_widgets = da7213_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(da7213_dapm_widgets), + .dapm_routes = da7213_audio_map, + .num_dapm_routes = ARRAY_SIZE(da7213_audio_map), + }, }; static const struct regmap_config da7213_regmap_config = { From 91985829cc198dad64b29980aef226e4af2f65c6 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:15:10 +0000 Subject: [PATCH 091/162] ASoC: codec duplicated callback function goes to component on da7218 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/da7218.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c index 99ce23e113bf..dcdda6c15cf7 100644 --- a/sound/soc/codecs/da7218.c +++ b/sound/soc/codecs/da7218.c @@ -3045,13 +3045,14 @@ static struct snd_soc_codec_driver soc_codec_dev_da7218 = { .resume = da7218_resume, .set_bias_level = da7218_set_bias_level, - .controls = da7218_snd_controls, - .num_controls = ARRAY_SIZE(da7218_snd_controls), - - .dapm_widgets = da7218_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(da7218_dapm_widgets), - .dapm_routes = da7218_audio_map, - .num_dapm_routes = ARRAY_SIZE(da7218_audio_map), + .component_driver = { + .controls = da7218_snd_controls, + .num_controls = ARRAY_SIZE(da7218_snd_controls), + .dapm_widgets = da7218_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(da7218_dapm_widgets), + .dapm_routes = da7218_audio_map, + .num_dapm_routes = ARRAY_SIZE(da7218_audio_map), + }, }; From b0d9df4dc5f3a690c460bb1bb0799ed85255448e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:15:27 +0000 Subject: [PATCH 092/162] ASoC: codec duplicated callback function goes to component on da7219 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/da7219.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 50ea94317cb3..b6411bd3c4f2 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -1767,13 +1767,14 @@ static struct snd_soc_codec_driver soc_codec_dev_da7219 = { .resume = da7219_resume, .set_bias_level = da7219_set_bias_level, - .controls = da7219_snd_controls, - .num_controls = ARRAY_SIZE(da7219_snd_controls), - - .dapm_widgets = da7219_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(da7219_dapm_widgets), - .dapm_routes = da7219_audio_map, - .num_dapm_routes = ARRAY_SIZE(da7219_audio_map), + .component_driver = { + .controls = da7219_snd_controls, + .num_controls = ARRAY_SIZE(da7219_snd_controls), + .dapm_widgets = da7219_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(da7219_dapm_widgets), + .dapm_routes = da7219_audio_map, + .num_dapm_routes = ARRAY_SIZE(da7219_audio_map), + }, }; From e7e8dda8b8a3dafd81c64f378c3a2d5cb71860df Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:15:48 +0000 Subject: [PATCH 093/162] ASoC: codec duplicated callback function goes to component on da732x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/da732x.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c index 461506a4ca6a..c1cc1c1c28f2 100644 --- a/sound/soc/codecs/da732x.c +++ b/sound/soc/codecs/da732x.c @@ -1501,12 +1501,14 @@ static int da732x_set_bias_level(struct snd_soc_codec *codec, static struct snd_soc_codec_driver soc_codec_dev_da732x = { .set_bias_level = da732x_set_bias_level, - .controls = da732x_snd_controls, - .num_controls = ARRAY_SIZE(da732x_snd_controls), - .dapm_widgets = da732x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(da732x_dapm_widgets), - .dapm_routes = da732x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(da732x_dapm_routes), + .component_driver = { + .controls = da732x_snd_controls, + .num_controls = ARRAY_SIZE(da732x_snd_controls), + .dapm_widgets = da732x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(da732x_dapm_widgets), + .dapm_routes = da732x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(da732x_dapm_routes), + }, .set_pll = da732x_set_dai_pll, }; From b2fb9a6e5cf0ef6771f821507ccb5ca6efd9acad Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:16:04 +0000 Subject: [PATCH 094/162] ASoC: codec duplicated callback function goes to component on da9055 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/da9055.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c index 0b2ede8db978..4efb5f897a0c 100644 --- a/sound/soc/codecs/da9055.c +++ b/sound/soc/codecs/da9055.c @@ -1455,13 +1455,14 @@ static struct snd_soc_codec_driver soc_codec_dev_da9055 = { .probe = da9055_probe, .set_bias_level = da9055_set_bias_level, - .controls = da9055_snd_controls, - .num_controls = ARRAY_SIZE(da9055_snd_controls), - - .dapm_widgets = da9055_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(da9055_dapm_widgets), - .dapm_routes = da9055_audio_map, - .num_dapm_routes = ARRAY_SIZE(da9055_audio_map), + .component_driver = { + .controls = da9055_snd_controls, + .num_controls = ARRAY_SIZE(da9055_snd_controls), + .dapm_widgets = da9055_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(da9055_dapm_widgets), + .dapm_routes = da9055_audio_map, + .num_dapm_routes = ARRAY_SIZE(da9055_audio_map), + }, }; static const struct regmap_config da9055_regmap_config = { From a73b8e8955fe7660455aaa20e8452f5322793fab Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:16:22 +0000 Subject: [PATCH 095/162] ASoC: codec duplicated callback function goes to component on dmic codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/dmic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c index fde53251c047..c82b9dc41e9a 100644 --- a/sound/soc/codecs/dmic.c +++ b/sound/soc/codecs/dmic.c @@ -51,10 +51,12 @@ static const struct snd_soc_dapm_route intercon[] = { }; static struct snd_soc_codec_driver soc_dmic = { - .dapm_widgets = dmic_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(dmic_dapm_widgets), - .dapm_routes = intercon, - .num_dapm_routes = ARRAY_SIZE(intercon), + .component_driver = { + .dapm_widgets = dmic_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(dmic_dapm_widgets), + .dapm_routes = intercon, + .num_dapm_routes = ARRAY_SIZE(intercon), + }, }; static int dmic_dev_probe(struct platform_device *pdev) From 88b0f761e296682f24639e9d9fc0122e7a7695c1 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:16:40 +0000 Subject: [PATCH 096/162] ASoC: codec duplicated callback function goes to component on hdmi-codec codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/hdmi-codec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index f64ecaa0141a..b904492d7744 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -375,13 +375,13 @@ static int hdmi_of_xlate_dai_name(struct snd_soc_component *component, } static struct snd_soc_codec_driver hdmi_codec = { - .controls = hdmi_controls, - .num_controls = ARRAY_SIZE(hdmi_controls), - .dapm_widgets = hdmi_widgets, - .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), - .dapm_routes = hdmi_routes, - .num_dapm_routes = ARRAY_SIZE(hdmi_routes), .component_driver = { + .controls = hdmi_controls, + .num_controls = ARRAY_SIZE(hdmi_controls), + .dapm_widgets = hdmi_widgets, + .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), + .dapm_routes = hdmi_routes, + .num_dapm_routes = ARRAY_SIZE(hdmi_routes), .of_xlate_dai_name = hdmi_of_xlate_dai_name, }, }; From 49e774807178c048d34602789f3342e545cc1605 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:16:59 +0000 Subject: [PATCH 097/162] ASoC: codec duplicated callback function goes to component on isabelle codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/isabelle.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c index be448373d39a..a4b0eded984a 100644 --- a/sound/soc/codecs/isabelle.c +++ b/sound/soc/codecs/isabelle.c @@ -1089,12 +1089,14 @@ static struct snd_soc_dai_driver isabelle_dai[] = { static struct snd_soc_codec_driver soc_codec_dev_isabelle = { .set_bias_level = isabelle_set_bias_level, - .controls = isabelle_snd_controls, - .num_controls = ARRAY_SIZE(isabelle_snd_controls), - .dapm_widgets = isabelle_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(isabelle_dapm_widgets), - .dapm_routes = isabelle_intercon, - .num_dapm_routes = ARRAY_SIZE(isabelle_intercon), + .component_driver = { + .controls = isabelle_snd_controls, + .num_controls = ARRAY_SIZE(isabelle_snd_controls), + .dapm_widgets = isabelle_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(isabelle_dapm_widgets), + .dapm_routes = isabelle_intercon, + .num_dapm_routes = ARRAY_SIZE(isabelle_intercon), + }, .idle_bias_off = true, }; From af15dc71b0c343279678af50543f6a64e84fb569 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:17:19 +0000 Subject: [PATCH 098/162] ASoC: codec duplicated callback function goes to component on jz4740 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/jz4740.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index 1f5ab99956ed..0290fab383da 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -298,12 +298,14 @@ static struct snd_soc_codec_driver soc_codec_dev_jz4740_codec = { .set_bias_level = jz4740_codec_set_bias_level, .suspend_bias_off = true, - .controls = jz4740_codec_controls, - .num_controls = ARRAY_SIZE(jz4740_codec_controls), - .dapm_widgets = jz4740_codec_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(jz4740_codec_dapm_widgets), - .dapm_routes = jz4740_codec_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(jz4740_codec_dapm_routes), + .component_driver = { + .controls = jz4740_codec_controls, + .num_controls = ARRAY_SIZE(jz4740_codec_controls), + .dapm_widgets = jz4740_codec_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(jz4740_codec_dapm_widgets), + .dapm_routes = jz4740_codec_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(jz4740_codec_dapm_routes), + }, }; static const struct regmap_config jz4740_codec_regmap_config = { From 2f15de710b44e17fec58880492a2c79b37f09f02 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:17:38 +0000 Subject: [PATCH 099/162] ASoC: codec duplicated callback function goes to component on lm49453 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/lm49453.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c index 9af5640e3446..8d413c2677cc 100644 --- a/sound/soc/codecs/lm49453.c +++ b/sound/soc/codecs/lm49453.c @@ -1391,12 +1391,14 @@ static struct snd_soc_dai_driver lm49453_dai[] = { static struct snd_soc_codec_driver soc_codec_dev_lm49453 = { .set_bias_level = lm49453_set_bias_level, - .controls = lm49453_snd_controls, - .num_controls = ARRAY_SIZE(lm49453_snd_controls), - .dapm_widgets = lm49453_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(lm49453_dapm_widgets), - .dapm_routes = lm49453_audio_map, - .num_dapm_routes = ARRAY_SIZE(lm49453_audio_map), + .component_driver = { + .controls = lm49453_snd_controls, + .num_controls = ARRAY_SIZE(lm49453_snd_controls), + .dapm_widgets = lm49453_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(lm49453_dapm_widgets), + .dapm_routes = lm49453_audio_map, + .num_dapm_routes = ARRAY_SIZE(lm49453_audio_map), + }, .idle_bias_off = true, }; From b5cd19e8c3efda9f0b81c7420886b640ef82d223 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:17:54 +0000 Subject: [PATCH 100/162] ASoC: codec duplicated callback function goes to component on wm98088 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max98088.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index fc22804cabc5..72f77455582e 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1704,12 +1704,14 @@ static struct snd_soc_codec_driver soc_codec_dev_max98088 = { .set_bias_level = max98088_set_bias_level, .suspend_bias_off = true, - .controls = max98088_snd_controls, - .num_controls = ARRAY_SIZE(max98088_snd_controls), - .dapm_widgets = max98088_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max98088_dapm_widgets), - .dapm_routes = max98088_audio_map, - .num_dapm_routes = ARRAY_SIZE(max98088_audio_map), + .component_driver = { + .controls = max98088_snd_controls, + .num_controls = ARRAY_SIZE(max98088_snd_controls), + .dapm_widgets = max98088_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max98088_dapm_widgets), + .dapm_routes = max98088_audio_map, + .num_dapm_routes = ARRAY_SIZE(max98088_audio_map), + }, }; static int max98088_i2c_probe(struct i2c_client *i2c, From 7fb49ebab0a1e50848466096a217bd8f0aa729eb Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:18:12 +0000 Subject: [PATCH 101/162] ASoC: codec duplicated callback function goes to component on wm98095 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max98095.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 3577003f39cf..6f8a757876ed 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c @@ -2108,12 +2108,14 @@ static struct snd_soc_codec_driver soc_codec_dev_max98095 = { .suspend = max98095_suspend, .resume = max98095_resume, .set_bias_level = max98095_set_bias_level, - .controls = max98095_snd_controls, - .num_controls = ARRAY_SIZE(max98095_snd_controls), - .dapm_widgets = max98095_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max98095_dapm_widgets), - .dapm_routes = max98095_audio_map, - .num_dapm_routes = ARRAY_SIZE(max98095_audio_map), + .component_driver = { + .controls = max98095_snd_controls, + .num_controls = ARRAY_SIZE(max98095_snd_controls), + .dapm_widgets = max98095_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max98095_dapm_widgets), + .dapm_routes = max98095_audio_map, + .num_dapm_routes = ARRAY_SIZE(max98095_audio_map), + }, }; static int max98095_i2c_probe(struct i2c_client *i2c, From b071a0bc0fdc03c4a97020ffcb5d529a02b3b564 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:18:31 +0000 Subject: [PATCH 102/162] ASoC: codec duplicated callback function goes to component on wm98357a codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max98357a.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c index 5b1dfb1518fb..6a6b68a4cb52 100644 --- a/sound/soc/codecs/max98357a.c +++ b/sound/soc/codecs/max98357a.c @@ -74,10 +74,12 @@ static int max98357a_codec_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver max98357a_codec_driver = { .probe = max98357a_codec_probe, - .dapm_widgets = max98357a_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max98357a_dapm_widgets), - .dapm_routes = max98357a_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(max98357a_dapm_routes), + .component_driver = { + .dapm_widgets = max98357a_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max98357a_dapm_widgets), + .dapm_routes = max98357a_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(max98357a_dapm_routes), + }, }; static const struct snd_soc_dai_ops max98357a_dai_ops = { From 9d32d3dca9f377f8dbfb03413cea5af5482e412c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:18:52 +0000 Subject: [PATCH 103/162] ASoC: codec duplicated callback function goes to component on wm9850 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max9850.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c index c14a79d026a1..0610840733d1 100644 --- a/sound/soc/codecs/max9850.c +++ b/sound/soc/codecs/max9850.c @@ -306,12 +306,14 @@ static struct snd_soc_codec_driver soc_codec_dev_max9850 = { .set_bias_level = max9850_set_bias_level, .suspend_bias_off = true, - .controls = max9850_controls, - .num_controls = ARRAY_SIZE(max9850_controls), - .dapm_widgets = max9850_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max9850_dapm_widgets), - .dapm_routes = max9850_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(max9850_dapm_routes), + .component_driver = { + .controls = max9850_controls, + .num_controls = ARRAY_SIZE(max9850_controls), + .dapm_widgets = max9850_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max9850_dapm_widgets), + .dapm_routes = max9850_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(max9850_dapm_routes), + }, }; static int max9850_i2c_probe(struct i2c_client *i2c, From e92b48aa21d41c64ae1a06d69b94c8dfaec9c672 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:19:11 +0000 Subject: [PATCH 104/162] ASoC: codec duplicated callback function goes to component on wm9867 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max9867.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 2a22fddeb6af..c9673235078d 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -417,12 +417,14 @@ static int max9867_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver max9867_codec = { .probe = max9867_probe, - .controls = max9867_snd_controls, - .num_controls = ARRAY_SIZE(max9867_snd_controls), - .dapm_routes = max9867_audio_map, - .num_dapm_routes = ARRAY_SIZE(max9867_audio_map), - .dapm_widgets = max9867_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max9867_dapm_widgets), + .component_driver = { + .controls = max9867_snd_controls, + .num_controls = ARRAY_SIZE(max9867_snd_controls), + .dapm_routes = max9867_audio_map, + .num_dapm_routes = ARRAY_SIZE(max9867_audio_map), + .dapm_widgets = max9867_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max9867_dapm_widgets), + }, }; static bool max9867_volatile_register(struct device *dev, unsigned int reg) From 4a4339d947e8989aa4f81dbc1cf086a11dbeeb89 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:19:29 +0000 Subject: [PATCH 105/162] ASoC: codec duplicated callback function goes to component on max98925 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max98925.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c index 5990de317999..327eaa25c9bd 100644 --- a/sound/soc/codecs/max98925.c +++ b/sound/soc/codecs/max98925.c @@ -540,12 +540,14 @@ static int max98925_probe(struct snd_soc_codec *codec) static const struct snd_soc_codec_driver soc_codec_dev_max98925 = { .probe = max98925_probe, - .controls = max98925_snd_controls, - .num_controls = ARRAY_SIZE(max98925_snd_controls), - .dapm_routes = max98925_audio_map, - .num_dapm_routes = ARRAY_SIZE(max98925_audio_map), - .dapm_widgets = max98925_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max98925_dapm_widgets), + .component_driver = { + .controls = max98925_snd_controls, + .num_controls = ARRAY_SIZE(max98925_snd_controls), + .dapm_routes = max98925_audio_map, + .num_dapm_routes = ARRAY_SIZE(max98925_audio_map), + .dapm_widgets = max98925_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max98925_dapm_widgets), + }, }; static const struct regmap_config max98925_regmap = { From 3d19c93b7ef6fb76a35a58585df62f9e386a96c2 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:19:48 +0000 Subject: [PATCH 106/162] ASoC: codec duplicated callback function goes to component on max98926 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/max98926.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c index 8d14adae5cc5..5830a81e535a 100644 --- a/sound/soc/codecs/max98926.c +++ b/sound/soc/codecs/max98926.c @@ -498,12 +498,14 @@ static int max98926_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver soc_codec_dev_max98926 = { .probe = max98926_probe, - .controls = max98926_snd_controls, - .num_controls = ARRAY_SIZE(max98926_snd_controls), - .dapm_routes = max98926_audio_map, - .num_dapm_routes = ARRAY_SIZE(max98926_audio_map), - .dapm_widgets = max98926_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(max98926_dapm_widgets), + .component_driver = { + .controls = max98926_snd_controls, + .num_controls = ARRAY_SIZE(max98926_snd_controls), + .dapm_routes = max98926_audio_map, + .num_dapm_routes = ARRAY_SIZE(max98926_audio_map), + .dapm_widgets = max98926_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max98926_dapm_widgets), + }, }; static const struct regmap_config max98926_regmap = { From f9294a24ae392a59f283b37c821c8f21c2ce1ade Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:20:05 +0000 Subject: [PATCH 107/162] ASoC: codec duplicated callback function goes to component on mc13783 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/mc13783.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c index 3e770cbe7f0f..90562703dcfd 100644 --- a/sound/soc/codecs/mc13783.c +++ b/sound/soc/codecs/mc13783.c @@ -737,12 +737,14 @@ static struct snd_soc_codec_driver soc_codec_dev_mc13783 = { .probe = mc13783_probe, .remove = mc13783_remove, .get_regmap = mc13783_get_regmap, - .controls = mc13783_control_list, - .num_controls = ARRAY_SIZE(mc13783_control_list), - .dapm_widgets = mc13783_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(mc13783_dapm_widgets), - .dapm_routes = mc13783_routes, - .num_dapm_routes = ARRAY_SIZE(mc13783_routes), + .component_driver = { + .controls = mc13783_control_list, + .num_controls = ARRAY_SIZE(mc13783_control_list), + .dapm_widgets = mc13783_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(mc13783_dapm_widgets), + .dapm_routes = mc13783_routes, + .num_dapm_routes = ARRAY_SIZE(mc13783_routes), + }, }; static int __init mc13783_codec_probe(struct platform_device *pdev) From e21413cab309abdc315ece737f6dff86669884d3 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:20:28 +0000 Subject: [PATCH 108/162] ASoC: codec duplicated callback function goes to component on ml26124 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ml26124.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c index f561c78b9e0e..69e5e18880c5 100644 --- a/sound/soc/codecs/ml26124.c +++ b/sound/soc/codecs/ml26124.c @@ -541,12 +541,14 @@ static struct snd_soc_codec_driver soc_codec_dev_ml26124 = { .probe = ml26124_probe, .set_bias_level = ml26124_set_bias_level, .suspend_bias_off = true, - .dapm_widgets = ml26124_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ml26124_dapm_widgets), - .dapm_routes = ml26124_intercon, - .num_dapm_routes = ARRAY_SIZE(ml26124_intercon), - .controls = ml26124_snd_controls, - .num_controls = ARRAY_SIZE(ml26124_snd_controls), + .component_driver = { + .controls = ml26124_snd_controls, + .num_controls = ARRAY_SIZE(ml26124_snd_controls), + .dapm_widgets = ml26124_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ml26124_dapm_widgets), + .dapm_routes = ml26124_intercon, + .num_dapm_routes = ARRAY_SIZE(ml26124_intercon), + }, }; static const struct regmap_config ml26124_i2c_regmap = { From 889adf638721a9dcd772e20075697338d65fb2bc Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:20:46 +0000 Subject: [PATCH 109/162] ASoC: codec duplicated callback function goes to component on nau8825 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/nau8825.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 5c9707ac4bbf..822791eb9574 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -2270,12 +2270,14 @@ static struct snd_soc_codec_driver nau8825_codec_driver = { .suspend = nau8825_suspend, .resume = nau8825_resume, - .controls = nau8825_controls, - .num_controls = ARRAY_SIZE(nau8825_controls), - .dapm_widgets = nau8825_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(nau8825_dapm_widgets), - .dapm_routes = nau8825_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(nau8825_dapm_routes), + .component_driver = { + .controls = nau8825_controls, + .num_controls = ARRAY_SIZE(nau8825_controls), + .dapm_widgets = nau8825_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(nau8825_dapm_widgets), + .dapm_routes = nau8825_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(nau8825_dapm_routes), + }, }; static void nau8825_reset_chip(struct regmap *regmap) From 4cd747df40c6dfdc61daf22b6457904a3d87213a Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:21:02 +0000 Subject: [PATCH 110/162] ASoC: codec duplicated callback function goes to component on pcm3008 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/pcm3008.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/pcm3008.c b/sound/soc/codecs/pcm3008.c index 8fb445f33f6f..708af05486f6 100644 --- a/sound/soc/codecs/pcm3008.c +++ b/sound/soc/codecs/pcm3008.c @@ -99,10 +99,12 @@ static struct snd_soc_dai_driver pcm3008_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_pcm3008 = { - .dapm_widgets = pcm3008_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(pcm3008_dapm_widgets), - .dapm_routes = pcm3008_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(pcm3008_dapm_routes), + .component_driver = { + .dapm_widgets = pcm3008_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(pcm3008_dapm_widgets), + .dapm_routes = pcm3008_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(pcm3008_dapm_routes), + }, }; static int pcm3008_codec_probe(struct platform_device *pdev) From a6a505dd2fabe43b969147f63d44a3dd1daf6f9d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:21:19 +0000 Subject: [PATCH 111/162] ASoC: codec duplicated callback function goes to component on rt286 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt286.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 74c0e4eb3788..9c365a7f758d 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -1053,12 +1053,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt286 = { .resume = rt286_resume, .set_bias_level = rt286_set_bias_level, .idle_bias_off = true, - .controls = rt286_snd_controls, - .num_controls = ARRAY_SIZE(rt286_snd_controls), - .dapm_widgets = rt286_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt286_dapm_widgets), - .dapm_routes = rt286_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt286_dapm_routes), + .component_driver = { + .controls = rt286_snd_controls, + .num_controls = ARRAY_SIZE(rt286_snd_controls), + .dapm_widgets = rt286_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt286_dapm_widgets), + .dapm_routes = rt286_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt286_dapm_routes), + }, }; static const struct regmap_config rt286_regmap = { From b5c998b472c25d72fedc1b686faf1fab6dfcbf4c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:21:37 +0000 Subject: [PATCH 112/162] ASoC: codec duplicated callback function goes to component on rt298 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt298.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c index f80cfe4d2ef2..55558643166f 100644 --- a/sound/soc/codecs/rt298.c +++ b/sound/soc/codecs/rt298.c @@ -1095,12 +1095,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt298 = { .resume = rt298_resume, .set_bias_level = rt298_set_bias_level, .idle_bias_off = true, - .controls = rt298_snd_controls, - .num_controls = ARRAY_SIZE(rt298_snd_controls), - .dapm_widgets = rt298_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt298_dapm_widgets), - .dapm_routes = rt298_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt298_dapm_routes), + .component_driver = { + .controls = rt298_snd_controls, + .num_controls = ARRAY_SIZE(rt298_snd_controls), + .dapm_widgets = rt298_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt298_dapm_widgets), + .dapm_routes = rt298_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt298_dapm_routes), + }, }; static const struct regmap_config rt298_regmap = { From a3470399bcfcd2ca57b6135f89f48e7e37a499fd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:21:55 +0000 Subject: [PATCH 113/162] ASoC: codec duplicated callback function goes to component on rt5514 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5514.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c index 7162f05101d9..e0606a58da98 100644 --- a/sound/soc/codecs/rt5514.c +++ b/sound/soc/codecs/rt5514.c @@ -1023,12 +1023,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5514 = { .probe = rt5514_probe, .idle_bias_off = true, .set_bias_level = rt5514_set_bias_level, - .controls = rt5514_snd_controls, - .num_controls = ARRAY_SIZE(rt5514_snd_controls), - .dapm_widgets = rt5514_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5514_dapm_widgets), - .dapm_routes = rt5514_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5514_dapm_routes), + .component_driver = { + .controls = rt5514_snd_controls, + .num_controls = ARRAY_SIZE(rt5514_snd_controls), + .dapm_widgets = rt5514_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5514_dapm_widgets), + .dapm_routes = rt5514_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5514_dapm_routes), + }, }; static const struct regmap_config rt5514_i2c_regmap = { From b72aa483c4d3668b1e95a1d968e64262c7d876f1 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:22:11 +0000 Subject: [PATCH 114/162] ASoC: codec duplicated callback function goes to component on rt5640 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5640.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 09e8988bbb2d..fbe3af14bd13 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -2261,12 +2261,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5640 = { .resume = rt5640_resume, .set_bias_level = rt5640_set_bias_level, .idle_bias_off = true, - .controls = rt5640_snd_controls, - .num_controls = ARRAY_SIZE(rt5640_snd_controls), - .dapm_widgets = rt5640_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5640_dapm_widgets), - .dapm_routes = rt5640_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5640_dapm_routes), + .component_driver = { + .controls = rt5640_snd_controls, + .num_controls = ARRAY_SIZE(rt5640_snd_controls), + .dapm_widgets = rt5640_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5640_dapm_widgets), + .dapm_routes = rt5640_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5640_dapm_routes), + }, }; static const struct regmap_config rt5640_regmap = { From 51712de1ea87b794e6e47584a87cda7cfd7a2056 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:22:33 +0000 Subject: [PATCH 115/162] ASoC: codec duplicated callback function goes to component on rt5645 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5645.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 490bfe661346..10c2a564a715 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3484,12 +3484,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5645 = { .resume = rt5645_resume, .set_bias_level = rt5645_set_bias_level, .idle_bias_off = true, - .controls = rt5645_snd_controls, - .num_controls = ARRAY_SIZE(rt5645_snd_controls), - .dapm_widgets = rt5645_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5645_dapm_widgets), - .dapm_routes = rt5645_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5645_dapm_routes), + .component_driver = { + .controls = rt5645_snd_controls, + .num_controls = ARRAY_SIZE(rt5645_snd_controls), + .dapm_widgets = rt5645_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5645_dapm_widgets), + .dapm_routes = rt5645_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5645_dapm_routes), + }, }; static const struct regmap_config rt5645_regmap = { From 1fd899821d59303d7e6ec4be14770213788f1bb8 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:22:51 +0000 Subject: [PATCH 116/162] ASoC: codec duplicated callback function goes to component on rt5651 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5651.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c index 7a6197042423..f5d34153e21f 100644 --- a/sound/soc/codecs/rt5651.c +++ b/sound/soc/codecs/rt5651.c @@ -1712,12 +1712,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5651 = { .resume = rt5651_resume, .set_bias_level = rt5651_set_bias_level, .idle_bias_off = true, - .controls = rt5651_snd_controls, - .num_controls = ARRAY_SIZE(rt5651_snd_controls), - .dapm_widgets = rt5651_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5651_dapm_widgets), - .dapm_routes = rt5651_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5651_dapm_routes), + .component_driver = { + .controls = rt5651_snd_controls, + .num_controls = ARRAY_SIZE(rt5651_snd_controls), + .dapm_widgets = rt5651_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5651_dapm_widgets), + .dapm_routes = rt5651_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5651_dapm_routes), + }, }; static const struct regmap_config rt5651_regmap = { From e0c2b59e83ab98dce500746d482850a2dffdcd22 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:23:07 +0000 Subject: [PATCH 117/162] ASoC: codec duplicated callback function goes to component on rt5659 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5659.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c index 1b30914c2d91..59ddaf34705b 100644 --- a/sound/soc/codecs/rt5659.c +++ b/sound/soc/codecs/rt5659.c @@ -3722,12 +3722,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5659 = { .resume = rt5659_resume, .set_bias_level = rt5659_set_bias_level, .idle_bias_off = true, - .controls = rt5659_snd_controls, - .num_controls = ARRAY_SIZE(rt5659_snd_controls), - .dapm_widgets = rt5659_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5659_dapm_widgets), - .dapm_routes = rt5659_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5659_dapm_routes), + .component_driver = { + .controls = rt5659_snd_controls, + .num_controls = ARRAY_SIZE(rt5659_snd_controls), + .dapm_widgets = rt5659_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5659_dapm_widgets), + .dapm_routes = rt5659_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5659_dapm_routes), + }, }; From 462fe79468ccc79d9d639f03c666b5c117b4957c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:23:24 +0000 Subject: [PATCH 118/162] ASoC: codec duplicated callback function goes to component on rt5670 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5670.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index 8ef467f64f03..49caf1393aeb 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c @@ -2777,12 +2777,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5670 = { .resume = rt5670_resume, .set_bias_level = rt5670_set_bias_level, .idle_bias_off = true, - .controls = rt5670_snd_controls, - .num_controls = ARRAY_SIZE(rt5670_snd_controls), - .dapm_widgets = rt5670_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5670_dapm_widgets), - .dapm_routes = rt5670_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5670_dapm_routes), + .component_driver = { + .controls = rt5670_snd_controls, + .num_controls = ARRAY_SIZE(rt5670_snd_controls), + .dapm_widgets = rt5670_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5670_dapm_widgets), + .dapm_routes = rt5670_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5670_dapm_routes), + }, }; static const struct regmap_config rt5670_regmap = { From 1ec95a5748de5fd448f0b54a3b3c6fcd3b8374c0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:23:46 +0000 Subject: [PATCH 119/162] ASoC: codec duplicated callback function goes to component on rt5677 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/rt5677.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index da9483c1c6fb..68268f2d68ca 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -4974,12 +4974,14 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5677 = { .resume = rt5677_resume, .set_bias_level = rt5677_set_bias_level, .idle_bias_off = true, - .controls = rt5677_snd_controls, - .num_controls = ARRAY_SIZE(rt5677_snd_controls), - .dapm_widgets = rt5677_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rt5677_dapm_widgets), - .dapm_routes = rt5677_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rt5677_dapm_routes), + .component_driver = { + .controls = rt5677_snd_controls, + .num_controls = ARRAY_SIZE(rt5677_snd_controls), + .dapm_widgets = rt5677_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(rt5677_dapm_widgets), + .dapm_routes = rt5677_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(rt5677_dapm_routes), + }, }; static const struct regmap_config rt5677_regmap_physical = { From 185c7c005ad89e7c21e9922cc5e92af761d87fb4 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:24:06 +0000 Subject: [PATCH 120/162] ASoC: codec duplicated callback function goes to component on si476x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/si476x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/si476x.c b/sound/soc/codecs/si476x.c index a8402d0af0ea..5344f4aa8fde 100644 --- a/sound/soc/codecs/si476x.c +++ b/sound/soc/codecs/si476x.c @@ -238,10 +238,12 @@ static struct regmap *si476x_get_regmap(struct device *dev) static struct snd_soc_codec_driver soc_codec_dev_si476x = { .get_regmap = si476x_get_regmap, - .dapm_widgets = si476x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(si476x_dapm_widgets), - .dapm_routes = si476x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(si476x_dapm_routes), + .component_driver = { + .dapm_widgets = si476x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(si476x_dapm_widgets), + .dapm_routes = si476x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(si476x_dapm_routes), + }, }; static int si476x_platform_probe(struct platform_device *pdev) From 486e0763e23d0fc91aac0b5a156a2646ed7c658f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:24:24 +0000 Subject: [PATCH 121/162] ASoC: codec duplicated callback function goes to component on sn95031 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/sn95031.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index 3a7de0159f24..eae54c37cff9 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c @@ -888,12 +888,14 @@ static struct snd_soc_codec_driver sn95031_codec = { .set_bias_level = sn95031_set_vaud_bias, .idle_bias_off = true, - .controls = sn95031_snd_controls, - .num_controls = ARRAY_SIZE(sn95031_snd_controls), - .dapm_widgets = sn95031_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets), - .dapm_routes = sn95031_audio_map, - .num_dapm_routes = ARRAY_SIZE(sn95031_audio_map), + .component_driver = { + .controls = sn95031_snd_controls, + .num_controls = ARRAY_SIZE(sn95031_snd_controls), + .dapm_widgets = sn95031_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets), + .dapm_routes = sn95031_audio_map, + .num_dapm_routes = ARRAY_SIZE(sn95031_audio_map), + }, }; static int sn95031_device_probe(struct platform_device *pdev) From 96107bbaf32ab93bd359c7741f3611aff08e144b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:24:44 +0000 Subject: [PATCH 122/162] ASoC: codec duplicated callback function goes to component on ssm2518 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/ssm2518.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c index e2e0bfa7ec20..38a85f3adc80 100644 --- a/sound/soc/codecs/ssm2518.c +++ b/sound/soc/codecs/ssm2518.c @@ -715,12 +715,14 @@ static struct snd_soc_codec_driver ssm2518_codec_driver = { .set_sysclk = ssm2518_set_sysclk, .idle_bias_off = true, - .controls = ssm2518_snd_controls, - .num_controls = ARRAY_SIZE(ssm2518_snd_controls), - .dapm_widgets = ssm2518_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ssm2518_dapm_widgets), - .dapm_routes = ssm2518_routes, - .num_dapm_routes = ARRAY_SIZE(ssm2518_routes), + .component_driver = { + .controls = ssm2518_snd_controls, + .num_controls = ARRAY_SIZE(ssm2518_snd_controls), + .dapm_widgets = ssm2518_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ssm2518_dapm_widgets), + .dapm_routes = ssm2518_routes, + .num_dapm_routes = ARRAY_SIZE(ssm2518_routes), + }, }; static const struct regmap_config ssm2518_regmap_config = { From 29926fc8e853b6ddfee916d91fe88bec07058107 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:25:03 +0000 Subject: [PATCH 123/162] ASoC: codec duplicated callback function goes to component on sta529 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/sta529.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c index 2cdaca943a8c..d4b384e4b266 100644 --- a/sound/soc/codecs/sta529.c +++ b/sound/soc/codecs/sta529.c @@ -317,8 +317,10 @@ static const struct snd_soc_codec_driver sta529_codec_driver = { .set_bias_level = sta529_set_bias_level, .suspend_bias_off = true, - .controls = sta529_snd_controls, - .num_controls = ARRAY_SIZE(sta529_snd_controls), + .component_driver = { + .controls = sta529_snd_controls, + .num_controls = ARRAY_SIZE(sta529_snd_controls), + }, }; static const struct regmap_config sta529_regmap = { From 70e710d649ce705910885617fda3e37528057300 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:25:22 +0000 Subject: [PATCH 124/162] ASoC: codec duplicated callback function goes to component on stac9766 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/stac9766.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 0945c51df003..2c5941f3a234 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c @@ -320,8 +320,10 @@ static int stac9766_codec_remove(struct snd_soc_codec *codec) } static struct snd_soc_codec_driver soc_codec_dev_stac9766 = { - .controls = stac9766_snd_ac97_controls, - .num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls), + .component_driver = { + .controls = stac9766_snd_ac97_controls, + .num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls), + }, .write = stac9766_ac97_write, .read = stac9766_ac97_read, .set_bias_level = stac9766_set_bias_level, From 40be1e609e743733e1e8a18b90e7be22c27d2062 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:25:40 +0000 Subject: [PATCH 125/162] ASoC: codec duplicated callback function goes to component on tlv320aic26 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic26.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 2c904d7150ad..14aa96d41719 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -321,12 +321,14 @@ static int aic26_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver aic26_soc_codec_dev = { .probe = aic26_probe, - .controls = aic26_snd_controls, - .num_controls = ARRAY_SIZE(aic26_snd_controls), - .dapm_widgets = tlv320aic26_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(tlv320aic26_dapm_widgets), - .dapm_routes = tlv320aic26_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(tlv320aic26_dapm_routes), + .component_driver = { + .controls = aic26_snd_controls, + .num_controls = ARRAY_SIZE(aic26_snd_controls), + .dapm_widgets = tlv320aic26_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tlv320aic26_dapm_widgets), + .dapm_routes = tlv320aic26_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(tlv320aic26_dapm_routes), + }, }; static const struct regmap_config aic26_regmap = { From a06809b83f5d8b8a84fc9eb1bd3dae8edf839774 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:25:57 +0000 Subject: [PATCH 126/162] ASoC: codec duplicated callback function goes to component on tlv320aic32x4 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic32x4.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index 85d4978d0384..28fdfc5ec544 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -797,12 +797,14 @@ static struct snd_soc_codec_driver soc_codec_dev_aic32x4 = { .set_bias_level = aic32x4_set_bias_level, .suspend_bias_off = true, - .controls = aic32x4_snd_controls, - .num_controls = ARRAY_SIZE(aic32x4_snd_controls), - .dapm_widgets = aic32x4_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(aic32x4_dapm_widgets), - .dapm_routes = aic32x4_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(aic32x4_dapm_routes), + .component_driver = { + .controls = aic32x4_snd_controls, + .num_controls = ARRAY_SIZE(aic32x4_snd_controls), + .dapm_widgets = aic32x4_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(aic32x4_dapm_widgets), + .dapm_routes = aic32x4_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(aic32x4_dapm_routes), + }, }; static int aic32x4_parse_dt(struct aic32x4_priv *aic32x4, From b04c71e634e6654cf4e52e7a94e98aba27c0e643 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:26:17 +0000 Subject: [PATCH 127/162] ASoC: codec duplicated callback function goes to component on tlv320dac33 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320dac33.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index f7a6ce7e5fb1..d64eac74d1cc 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -1453,12 +1453,14 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = { .probe = dac33_soc_probe, .remove = dac33_soc_remove, - .controls = dac33_snd_controls, - .num_controls = ARRAY_SIZE(dac33_snd_controls), - .dapm_widgets = dac33_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(dac33_dapm_widgets), - .dapm_routes = audio_map, - .num_dapm_routes = ARRAY_SIZE(audio_map), + .component_driver = { + .controls = dac33_snd_controls, + .num_controls = ARRAY_SIZE(dac33_snd_controls), + .dapm_widgets = dac33_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(dac33_dapm_widgets), + .dapm_routes = audio_map, + .num_dapm_routes = ARRAY_SIZE(audio_map), + }, }; #define DAC33_RATES (SNDRV_PCM_RATE_44100 | \ From e4b918ea24b1e16db7370883a6748efe7a3ac9ff Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:26:35 +0000 Subject: [PATCH 128/162] ASoC: codec duplicated callback function goes to component on twl4030 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/twl4030.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index a5a4e9f75c57..a2104d68169d 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -2199,12 +2199,14 @@ static struct snd_soc_codec_driver soc_codec_dev_twl4030 = { .set_bias_level = twl4030_set_bias_level, .idle_bias_off = true, - .controls = twl4030_snd_controls, - .num_controls = ARRAY_SIZE(twl4030_snd_controls), - .dapm_widgets = twl4030_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(twl4030_dapm_widgets), - .dapm_routes = intercon, - .num_dapm_routes = ARRAY_SIZE(intercon), + .component_driver = { + .controls = twl4030_snd_controls, + .num_controls = ARRAY_SIZE(twl4030_snd_controls), + .dapm_widgets = twl4030_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(twl4030_dapm_widgets), + .dapm_routes = intercon, + .num_dapm_routes = ARRAY_SIZE(intercon), + }, }; static int twl4030_codec_probe(struct platform_device *pdev) From 2f45b8bd731cbaee5404cfac8bf083e807cffadf Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:26:56 +0000 Subject: [PATCH 129/162] ASoC: codec duplicated callback function goes to component on twl6040 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/twl6040.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 1f7081043566..748036e851ea 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1156,12 +1156,14 @@ static struct snd_soc_codec_driver soc_codec_dev_twl6040 = { .suspend_bias_off = true, .ignore_pmdown_time = true, - .controls = twl6040_snd_controls, - .num_controls = ARRAY_SIZE(twl6040_snd_controls), - .dapm_widgets = twl6040_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(twl6040_dapm_widgets), - .dapm_routes = intercon, - .num_dapm_routes = ARRAY_SIZE(intercon), + .component_driver = { + .controls = twl6040_snd_controls, + .num_controls = ARRAY_SIZE(twl6040_snd_controls), + .dapm_widgets = twl6040_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(twl6040_dapm_widgets), + .dapm_routes = intercon, + .num_dapm_routes = ARRAY_SIZE(intercon), + }, }; static int twl6040_codec_probe(struct platform_device *pdev) From e939fc6c2679c474c31c7e07c73703099bd68f70 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:27:14 +0000 Subject: [PATCH 130/162] ASoC: codec duplicated callback function goes to component on uda134x codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/uda134x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index e4c694c758b8..a4a3e9854086 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c @@ -523,10 +523,12 @@ static struct snd_soc_codec_driver soc_codec_dev_uda134x = { .set_bias_level = uda134x_set_bias_level, .suspend_bias_off = true, - .dapm_widgets = uda134x_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(uda134x_dapm_widgets), - .dapm_routes = uda134x_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(uda134x_dapm_routes), + .component_driver = { + .dapm_widgets = uda134x_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(uda134x_dapm_widgets), + .dapm_routes = uda134x_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(uda134x_dapm_routes), + }, }; static const struct regmap_config uda134x_regmap_config = { From 68509ede7e80e6cd1782485f9a91c9641adadc54 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:27:32 +0000 Subject: [PATCH 131/162] ASoC: codec duplicated callback function goes to component on uda1380 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/uda1380.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 35f0469ebb16..533e3bb444e4 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c @@ -765,12 +765,14 @@ static struct snd_soc_codec_driver soc_codec_dev_uda1380 = { .reg_cache_default = uda1380_reg, .reg_cache_step = 1, - .controls = uda1380_snd_controls, - .num_controls = ARRAY_SIZE(uda1380_snd_controls), - .dapm_widgets = uda1380_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(uda1380_dapm_widgets), - .dapm_routes = uda1380_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(uda1380_dapm_routes), + .component_driver = { + .controls = uda1380_snd_controls, + .num_controls = ARRAY_SIZE(uda1380_snd_controls), + .dapm_widgets = uda1380_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(uda1380_dapm_widgets), + .dapm_routes = uda1380_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(uda1380_dapm_routes), + }, }; #if IS_ENABLED(CONFIG_I2C) From 23ce0ad98946b6d27d43bec2cc1fb34013761690 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:27:49 +0000 Subject: [PATCH 132/162] ASoC: codec duplicated callback function goes to component on wl1273 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wl1273.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index 1b79778098d2..fcffb6e707d9 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -484,12 +484,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wl1273 = { .probe = wl1273_probe, .remove = wl1273_remove, - .controls = wl1273_controls, - .num_controls = ARRAY_SIZE(wl1273_controls), - .dapm_widgets = wl1273_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wl1273_dapm_widgets), - .dapm_routes = wl1273_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wl1273_dapm_routes), + .component_driver = { + .controls = wl1273_controls, + .num_controls = ARRAY_SIZE(wl1273_controls), + .dapm_widgets = wl1273_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wl1273_dapm_widgets), + .dapm_routes = wl1273_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wl1273_dapm_routes), + }, }; static int wl1273_platform_probe(struct platform_device *pdev) From 022f86d6f3b15bcd4865bccf837d309eb336f5a2 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:28:08 +0000 Subject: [PATCH 133/162] ASoC: codec duplicated callback function goes to component on wm0010 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm0010.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index e3c34bdc2772..4ef6919ab1a1 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -795,10 +795,12 @@ static struct snd_soc_codec_driver soc_codec_dev_wm0010 = { .set_sysclk = wm0010_set_sysclk, .idle_bias_off = true, - .dapm_widgets = wm0010_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm0010_dapm_widgets), - .dapm_routes = wm0010_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm0010_dapm_routes), + .component_driver = { + .dapm_widgets = wm0010_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm0010_dapm_widgets), + .dapm_routes = wm0010_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm0010_dapm_routes), + }, }; #define WM0010_RATES (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) From c6c0a214001ecc6c5d42c1226cdd33c07f8a016b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:28:25 +0000 Subject: [PATCH 134/162] ASoC: codec duplicated callback function goes to component on wm1250-ev1 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm1250-ev1.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm1250-ev1.c b/sound/soc/codecs/wm1250-ev1.c index ec45c5b220b1..caf501227265 100644 --- a/sound/soc/codecs/wm1250-ev1.c +++ b/sound/soc/codecs/wm1250-ev1.c @@ -142,11 +142,12 @@ static struct snd_soc_dai_driver wm1250_ev1_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_wm1250_ev1 = { - .dapm_widgets = wm1250_ev1_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm1250_ev1_dapm_widgets), - .dapm_routes = wm1250_ev1_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm1250_ev1_dapm_routes), - + .component_driver = { + .dapm_widgets = wm1250_ev1_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm1250_ev1_dapm_widgets), + .dapm_routes = wm1250_ev1_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm1250_ev1_dapm_routes), + }, .set_bias_level = wm1250_ev1_set_bias_level, .idle_bias_off = true, }; From bd22e11e1b48c088472bc1e91c8ee3a484eaf428 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:28:43 +0000 Subject: [PATCH 135/162] ASoC: codec duplicated callback function goes to component on wm2000 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm2000.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index a67ea10f41a1..1ebaf99a1907 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -805,12 +805,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm2000 = { .suspend = wm2000_suspend, .resume = wm2000_resume, - .dapm_widgets = wm2000_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm2000_dapm_widgets), - .dapm_routes = wm2000_audio_map, - .num_dapm_routes = ARRAY_SIZE(wm2000_audio_map), - .controls = wm2000_controls, - .num_controls = ARRAY_SIZE(wm2000_controls), + .component_driver = { + .controls = wm2000_controls, + .num_controls = ARRAY_SIZE(wm2000_controls), + .dapm_widgets = wm2000_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm2000_dapm_widgets), + .dapm_routes = wm2000_audio_map, + .num_dapm_routes = ARRAY_SIZE(wm2000_audio_map), + }, }; static int wm2000_i2c_probe(struct i2c_client *i2c, From b68f37aa2e56c4281d096ca7d165c0bf663ecd2b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:28:59 +0000 Subject: [PATCH 136/162] ASoC: codec duplicated callback function goes to component on wm2200 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm2200.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index fd1439ecb50a..d913d0e3e9be 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c @@ -2111,12 +2111,14 @@ static struct snd_soc_codec_driver soc_codec_wm2200 = { .set_sysclk = wm2200_set_sysclk, .set_pll = wm2200_set_fll, - .controls = wm2200_snd_controls, - .num_controls = ARRAY_SIZE(wm2200_snd_controls), - .dapm_widgets = wm2200_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm2200_dapm_widgets), - .dapm_routes = wm2200_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm2200_dapm_routes), + .component_driver = { + .controls = wm2200_snd_controls, + .num_controls = ARRAY_SIZE(wm2200_snd_controls), + .dapm_widgets = wm2200_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm2200_dapm_widgets), + .dapm_routes = wm2200_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm2200_dapm_routes), + }, }; static irqreturn_t wm2200_irq(int irq, void *data) From 99a95b23a2ad6a5f314e295ded68ea609d288e7c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:29:19 +0000 Subject: [PATCH 137/162] ASoC: codec duplicated callback function goes to component on wm5100 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm5100.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 512a9d25fe6f..8cbdf1701222 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -2390,12 +2390,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm5100 = { .idle_bias_off = 1, .seq_notifier = wm5100_seq_notifier, - .controls = wm5100_snd_controls, - .num_controls = ARRAY_SIZE(wm5100_snd_controls), - .dapm_widgets = wm5100_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm5100_dapm_widgets), - .dapm_routes = wm5100_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm5100_dapm_routes), + .component_driver = { + .controls = wm5100_snd_controls, + .num_controls = ARRAY_SIZE(wm5100_snd_controls), + .dapm_widgets = wm5100_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm5100_dapm_widgets), + .dapm_routes = wm5100_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm5100_dapm_routes), + }, }; static const struct regmap_config wm5100_regmap = { From 4214c3460502e3c57c7cb8269e5c4193d800c929 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:29:37 +0000 Subject: [PATCH 138/162] ASoC: codec duplicated callback function goes to component on wm5102 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm5102.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 846deed6af41..1295978e8360 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -2000,12 +2000,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm5102 = { .set_sysclk = arizona_set_sysclk, .set_pll = wm5102_set_fll, - .controls = wm5102_snd_controls, - .num_controls = ARRAY_SIZE(wm5102_snd_controls), - .dapm_widgets = wm5102_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm5102_dapm_widgets), - .dapm_routes = wm5102_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm5102_dapm_routes), + .component_driver = { + .controls = wm5102_snd_controls, + .num_controls = ARRAY_SIZE(wm5102_snd_controls), + .dapm_widgets = wm5102_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm5102_dapm_widgets), + .dapm_routes = wm5102_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm5102_dapm_routes), + }, }; static struct snd_compr_ops wm5102_compr_ops = { From 098c0756931833068318f29d476dffc2aa694582 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:29:55 +0000 Subject: [PATCH 139/162] ASoC: codec duplicated callback function goes to component on wm5110 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm5110.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 156547026a40..3e7f873f2709 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2357,12 +2357,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm5110 = { .set_sysclk = arizona_set_sysclk, .set_pll = wm5110_set_fll, - .controls = wm5110_snd_controls, - .num_controls = ARRAY_SIZE(wm5110_snd_controls), - .dapm_widgets = wm5110_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm5110_dapm_widgets), - .dapm_routes = wm5110_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm5110_dapm_routes), + .component_driver = { + .controls = wm5110_snd_controls, + .num_controls = ARRAY_SIZE(wm5110_snd_controls), + .dapm_widgets = wm5110_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm5110_dapm_widgets), + .dapm_routes = wm5110_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm5110_dapm_routes), + }, }; static struct snd_compr_ops wm5110_compr_ops = { From 667a8069066093f618b3930272f52e090ca49d88 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:30:13 +0000 Subject: [PATCH 140/162] ASoC: codec duplicated callback function goes to component on wm8350 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8350.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index ffbf3df8ae97..18bc4ca07fcb 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -1594,12 +1594,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8350 = { .set_bias_level = wm8350_set_bias_level, .suspend_bias_off = true, - .controls = wm8350_snd_controls, - .num_controls = ARRAY_SIZE(wm8350_snd_controls), - .dapm_widgets = wm8350_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8350_dapm_widgets), - .dapm_routes = wm8350_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8350_dapm_routes), + .component_driver = { + .controls = wm8350_snd_controls, + .num_controls = ARRAY_SIZE(wm8350_snd_controls), + .dapm_widgets = wm8350_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8350_dapm_widgets), + .dapm_routes = wm8350_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8350_dapm_routes), + }, }; static int wm8350_probe(struct platform_device *pdev) From 7b5deb2d62b72effc7de9783caeeeed376e3942b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:30:34 +0000 Subject: [PATCH 141/162] ASoC: codec duplicated callback function goes to component on wm8400 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8400.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index b1d346aa4696..4551e54a8d5b 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c @@ -1339,12 +1339,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8400 = { .set_bias_level = wm8400_set_bias_level, .suspend_bias_off = true, - .controls = wm8400_snd_controls, - .num_controls = ARRAY_SIZE(wm8400_snd_controls), - .dapm_widgets = wm8400_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8400_dapm_widgets), - .dapm_routes = wm8400_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8400_dapm_routes), + .component_driver = { + .controls = wm8400_snd_controls, + .num_controls = ARRAY_SIZE(wm8400_snd_controls), + .dapm_widgets = wm8400_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8400_dapm_widgets), + .dapm_routes = wm8400_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8400_dapm_routes), + }, }; static int wm8400_probe(struct platform_device *pdev) From 59b06efb2374f116b4a8007d3b00ab55a5fd3cbc Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:30:51 +0000 Subject: [PATCH 142/162] ASoC: codec duplicated callback function goes to component on wm8727 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8727.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8727.c b/sound/soc/codecs/wm8727.c index bb25a75f92a2..b01e64ec45fd 100644 --- a/sound/soc/codecs/wm8727.c +++ b/sound/soc/codecs/wm8727.c @@ -54,10 +54,12 @@ static struct snd_soc_dai_driver wm8727_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_wm8727 = { - .dapm_widgets = wm8727_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8727_dapm_widgets), - .dapm_routes = wm8727_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8727_dapm_routes), + .component_driver = { + .dapm_widgets = wm8727_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8727_dapm_widgets), + .dapm_routes = wm8727_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8727_dapm_routes), + }, }; static int wm8727_probe(struct platform_device *pdev) From f56531d019f3f13d56c48619d9deeee34efccefb Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:31:09 +0000 Subject: [PATCH 143/162] ASoC: codec duplicated callback function goes to component on wm8782 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8782.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index fb55fd845d27..1e9c4953dc10 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -51,10 +51,12 @@ static struct snd_soc_dai_driver wm8782_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_wm8782 = { - .dapm_widgets = wm8782_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8782_dapm_widgets), - .dapm_routes = wm8782_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8782_dapm_routes), + .component_driver = { + .dapm_widgets = wm8782_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8782_dapm_widgets), + .dapm_routes = wm8782_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8782_dapm_routes), + }, }; static int wm8782_probe(struct platform_device *pdev) From 496360f5a8a267d72486fb5615f04e063edd6ed0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:31:25 +0000 Subject: [PATCH 144/162] ASoC: codec duplicated callback function goes to component on wm8900 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8900.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 5d8dca88d612..724cec4a638d 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c @@ -1214,12 +1214,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8900 = { .resume = wm8900_resume, .set_bias_level = wm8900_set_bias_level, - .controls = wm8900_snd_controls, - .num_controls = ARRAY_SIZE(wm8900_snd_controls), - .dapm_widgets = wm8900_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8900_dapm_widgets), - .dapm_routes = wm8900_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8900_dapm_routes), + .component_driver = { + .controls = wm8900_snd_controls, + .num_controls = ARRAY_SIZE(wm8900_snd_controls), + .dapm_widgets = wm8900_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8900_dapm_widgets), + .dapm_routes = wm8900_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8900_dapm_routes), + }, }; static const struct regmap_config wm8900_regmap = { From 90a60b06f41880b2415720cec14ea0d830384461 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:31:43 +0000 Subject: [PATCH 145/162] ASoC: codec duplicated callback function goes to component on wm8940 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8940.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 1c600819f768..3c9febcc8636 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -728,12 +728,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8940 = { .set_bias_level = wm8940_set_bias_level, .suspend_bias_off = true, - .controls = wm8940_snd_controls, - .num_controls = ARRAY_SIZE(wm8940_snd_controls), - .dapm_widgets = wm8940_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8940_dapm_widgets), - .dapm_routes = wm8940_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8940_dapm_routes), + .component_driver = { + .controls = wm8940_snd_controls, + .num_controls = ARRAY_SIZE(wm8940_snd_controls), + .dapm_widgets = wm8940_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8940_dapm_widgets), + .dapm_routes = wm8940_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8940_dapm_routes), + }, }; static const struct regmap_config wm8940_regmap = { From 11f473eab148571c9eb2af066b1faaddae8e4fa7 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:32:00 +0000 Subject: [PATCH 146/162] ASoC: codec duplicated callback function goes to component on wm8955 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8955.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 9db00d53abe7..575075d5587e 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c @@ -945,12 +945,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8955 = { .set_bias_level = wm8955_set_bias_level, .suspend_bias_off = true, - .controls = wm8955_snd_controls, - .num_controls = ARRAY_SIZE(wm8955_snd_controls), - .dapm_widgets = wm8955_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8955_dapm_widgets), - .dapm_routes = wm8955_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8955_dapm_routes), + .component_driver = { + .controls = wm8955_snd_controls, + .num_controls = ARRAY_SIZE(wm8955_snd_controls), + .dapm_widgets = wm8955_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8955_dapm_widgets), + .dapm_routes = wm8955_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8955_dapm_routes), + }, }; static const struct regmap_config wm8955_regmap = { From 5e731b7e3bb02c60f42935efee40b9c3118d1a2f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:32:18 +0000 Subject: [PATCH 147/162] ASoC: codec duplicated callback function goes to component on wm8961 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8961.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index e30446a04740..4b51761f6816 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -888,12 +888,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8961 = { .set_bias_level = wm8961_set_bias_level, .suspend_bias_off = true, - .controls = wm8961_snd_controls, - .num_controls = ARRAY_SIZE(wm8961_snd_controls), - .dapm_widgets = wm8961_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8961_dapm_widgets), - .dapm_routes = audio_paths, - .num_dapm_routes = ARRAY_SIZE(audio_paths), + .component_driver = { + .controls = wm8961_snd_controls, + .num_controls = ARRAY_SIZE(wm8961_snd_controls), + .dapm_widgets = wm8961_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8961_dapm_widgets), + .dapm_routes = audio_paths, + .num_dapm_routes = ARRAY_SIZE(audio_paths), + }, }; static const struct regmap_config wm8961_regmap = { From d792e7b678cded4dae6a19e00082bf885833fa19 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:32:37 +0000 Subject: [PATCH 148/162] ASoC: codec duplicated callback function goes to component on wm8971 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8971.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index 2cdde32c43c6..214fa139ff0e 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c @@ -654,12 +654,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8971 = { .set_bias_level = wm8971_set_bias_level, .suspend_bias_off = true, - .controls = wm8971_snd_controls, - .num_controls = ARRAY_SIZE(wm8971_snd_controls), - .dapm_widgets = wm8971_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8971_dapm_widgets), - .dapm_routes = wm8971_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8971_dapm_routes), + .component_driver = { + .controls = wm8971_snd_controls, + .num_controls = ARRAY_SIZE(wm8971_snd_controls), + .dapm_widgets = wm8971_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8971_dapm_widgets), + .dapm_routes = wm8971_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8971_dapm_routes), + }, }; static const struct regmap_config wm8971_regmap = { From c79dc99cdab0f35950460172c809e7900e214fdf Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:32:54 +0000 Subject: [PATCH 149/162] ASoC: codec duplicated callback function goes to component on wm8983 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8983.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c index 0c002a5712cb..9609fc0e2821 100644 --- a/sound/soc/codecs/wm8983.c +++ b/sound/soc/codecs/wm8983.c @@ -980,12 +980,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8983 = { .probe = wm8983_probe, .set_bias_level = wm8983_set_bias_level, .suspend_bias_off = true, - .controls = wm8983_snd_controls, - .num_controls = ARRAY_SIZE(wm8983_snd_controls), - .dapm_widgets = wm8983_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8983_dapm_widgets), - .dapm_routes = wm8983_audio_map, - .num_dapm_routes = ARRAY_SIZE(wm8983_audio_map), + .component_driver = { + .controls = wm8983_snd_controls, + .num_controls = ARRAY_SIZE(wm8983_snd_controls), + .dapm_widgets = wm8983_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8983_dapm_widgets), + .dapm_routes = wm8983_audio_map, + .num_dapm_routes = ARRAY_SIZE(wm8983_audio_map), + }, }; static const struct regmap_config wm8983_regmap = { From 11f851f56336f35e2e7575465b53d5d583bbad22 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:33:11 +0000 Subject: [PATCH 150/162] ASoC: codec duplicated callback function goes to component on wm8988 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8988.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index 895721a256f0..b0d0219532f2 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c @@ -817,12 +817,14 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm8988 = { .set_bias_level = wm8988_set_bias_level, .suspend_bias_off = true, - .controls = wm8988_snd_controls, - .num_controls = ARRAY_SIZE(wm8988_snd_controls), - .dapm_widgets = wm8988_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8988_dapm_widgets), - .dapm_routes = wm8988_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8988_dapm_routes), + .component_driver = { + .controls = wm8988_snd_controls, + .num_controls = ARRAY_SIZE(wm8988_snd_controls), + .dapm_widgets = wm8988_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8988_dapm_widgets), + .dapm_routes = wm8988_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8988_dapm_routes), + }, }; static const struct regmap_config wm8988_regmap = { From 0b71b898ff530c0acae9e32df1f884dbdf5d110f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:33:30 +0000 Subject: [PATCH 151/162] ASoC: codec duplicated callback function goes to component on wm8990 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8990.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 23ecd30d8bca..a412fd0a2e64 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c @@ -1299,12 +1299,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8990 = { .set_bias_level = wm8990_set_bias_level, .suspend_bias_off = true, - .controls = wm8990_snd_controls, - .num_controls = ARRAY_SIZE(wm8990_snd_controls), - .dapm_widgets = wm8990_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8990_dapm_widgets), - .dapm_routes = wm8990_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8990_dapm_routes), + .component_driver = { + .controls = wm8990_snd_controls, + .num_controls = ARRAY_SIZE(wm8990_snd_controls), + .dapm_widgets = wm8990_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8990_dapm_widgets), + .dapm_routes = wm8990_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8990_dapm_routes), + }, }; static const struct regmap_config wm8990_regmap = { From 4664b5e2bf4a44ed625536a79886b4dee17ef9e1 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:33:47 +0000 Subject: [PATCH 152/162] ASoC: codec duplicated callback function goes to component on wm8991 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8991.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index c9ee0ac6a654..5822d1008f07 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c @@ -1236,12 +1236,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8991 = { .set_bias_level = wm8991_set_bias_level, .suspend_bias_off = true, - .controls = wm8991_snd_controls, - .num_controls = ARRAY_SIZE(wm8991_snd_controls), - .dapm_widgets = wm8991_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8991_dapm_widgets), - .dapm_routes = wm8991_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8991_dapm_routes), + .component_driver = { + .controls = wm8991_snd_controls, + .num_controls = ARRAY_SIZE(wm8991_snd_controls), + .dapm_widgets = wm8991_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8991_dapm_widgets), + .dapm_routes = wm8991_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8991_dapm_routes), + }, }; static const struct regmap_config wm8991_regmap = { From af84d1c4dd08b3a185f9ae74165c5cc0ad975559 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:34:07 +0000 Subject: [PATCH 153/162] ASoC: codec duplicated callback function goes to component on wm8995 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8995.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index 24500bafb0a8..19b08a5cae62 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -2192,12 +2192,14 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm8995 = { .set_bias_level = wm8995_set_bias_level, .idle_bias_off = true, - .controls = wm8995_snd_controls, - .num_controls = ARRAY_SIZE(wm8995_snd_controls), - .dapm_widgets = wm8995_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8995_dapm_widgets), - .dapm_routes = wm8995_intercon, - .num_dapm_routes = ARRAY_SIZE(wm8995_intercon), + .component_driver = { + .controls = wm8995_snd_controls, + .num_controls = ARRAY_SIZE(wm8995_snd_controls), + .dapm_widgets = wm8995_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8995_dapm_widgets), + .dapm_routes = wm8995_intercon, + .num_dapm_routes = ARRAY_SIZE(wm8995_intercon), + }, }; static const struct regmap_config wm8995_regmap = { From efee13aa36cb96f78bf2410fa488e60e021a707e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:34:24 +0000 Subject: [PATCH 154/162] ASoC: codec duplicated callback function goes to component on wm8996 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8996.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index a73044251218..abacf6c99499 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -2690,12 +2690,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8996 = { .set_bias_level = wm8996_set_bias_level, .idle_bias_off = true, .seq_notifier = wm8996_seq_notifier, - .controls = wm8996_snd_controls, - .num_controls = ARRAY_SIZE(wm8996_snd_controls), - .dapm_widgets = wm8996_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8996_dapm_widgets), - .dapm_routes = wm8996_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8996_dapm_routes), + .component_driver = { + .controls = wm8996_snd_controls, + .num_controls = ARRAY_SIZE(wm8996_snd_controls), + .dapm_widgets = wm8996_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8996_dapm_widgets), + .dapm_routes = wm8996_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8996_dapm_routes), + }, .set_pll = wm8996_set_fll, }; From 4df0f6203e82c38aa7ec59ab706e7aa4d410ad45 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:34:40 +0000 Subject: [PATCH 155/162] ASoC: codec duplicated callback function goes to component on wm8997 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8997.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index 6b0785b5a5c5..cf23a6b76846 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c @@ -1105,12 +1105,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8997 = { .set_sysclk = arizona_set_sysclk, .set_pll = wm8997_set_fll, - .controls = wm8997_snd_controls, - .num_controls = ARRAY_SIZE(wm8997_snd_controls), - .dapm_widgets = wm8997_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8997_dapm_widgets), - .dapm_routes = wm8997_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8997_dapm_routes), + .component_driver = { + .controls = wm8997_snd_controls, + .num_controls = ARRAY_SIZE(wm8997_snd_controls), + .dapm_widgets = wm8997_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8997_dapm_widgets), + .dapm_routes = wm8997_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8997_dapm_routes), + }, }; static int wm8997_probe(struct platform_device *pdev) From 38addd95b81ac84bec4b33fbae739e96fae6e588 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:34:58 +0000 Subject: [PATCH 156/162] ASoC: codec duplicated callback function goes to component on wm8998 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm8998.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 3a5c896a2d13..315b23b836d0 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -1361,12 +1361,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8998 = { .set_sysclk = arizona_set_sysclk, .set_pll = wm8998_set_fll, - .controls = wm8998_snd_controls, - .num_controls = ARRAY_SIZE(wm8998_snd_controls), - .dapm_widgets = wm8998_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm8998_dapm_widgets), - .dapm_routes = wm8998_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm8998_dapm_routes), + .component_driver = { + .controls = wm8998_snd_controls, + .num_controls = ARRAY_SIZE(wm8998_snd_controls), + .dapm_widgets = wm8998_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8998_dapm_widgets), + .dapm_routes = wm8998_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8998_dapm_routes), + }, }; static int wm8998_probe(struct platform_device *pdev) From 216cf784ddea751d930b9e9b77a1b8b5db5cb434 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:35:15 +0000 Subject: [PATCH 157/162] ASoC: codec duplicated callback function goes to component on wm9081 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm9081.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 363b3b667616..30eaf4c92cd8 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c @@ -1282,12 +1282,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9081 = { .idle_bias_off = true, - .controls = wm9081_snd_controls, - .num_controls = ARRAY_SIZE(wm9081_snd_controls), - .dapm_widgets = wm9081_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm9081_dapm_widgets), - .dapm_routes = wm9081_audio_paths, - .num_dapm_routes = ARRAY_SIZE(wm9081_audio_paths), + .component_driver = { + .controls = wm9081_snd_controls, + .num_controls = ARRAY_SIZE(wm9081_snd_controls), + .dapm_widgets = wm9081_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm9081_dapm_widgets), + .dapm_routes = wm9081_audio_paths, + .num_dapm_routes = ARRAY_SIZE(wm9081_audio_paths), + }, }; static const struct regmap_config wm9081_regmap = { From 2fa1f30af91be69158bf86fa9e4d474c0bc955dc Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:35:34 +0000 Subject: [PATCH 158/162] ASoC: codec duplicated callback function goes to component on wm9705 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm9705.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index 744842c76a60..c88492d137fb 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c @@ -364,12 +364,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9705 = { .reg_cache_step = 2, .reg_cache_default = wm9705_reg, - .controls = wm9705_snd_ac97_controls, - .num_controls = ARRAY_SIZE(wm9705_snd_ac97_controls), - .dapm_widgets = wm9705_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm9705_dapm_widgets), - .dapm_routes = wm9705_audio_map, - .num_dapm_routes = ARRAY_SIZE(wm9705_audio_map), + .component_driver = { + .controls = wm9705_snd_ac97_controls, + .num_controls = ARRAY_SIZE(wm9705_snd_ac97_controls), + .dapm_widgets = wm9705_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm9705_dapm_widgets), + .dapm_routes = wm9705_audio_map, + .num_dapm_routes = ARRAY_SIZE(wm9705_audio_map), + }, }; static int wm9705_probe(struct platform_device *pdev) From 3123e54b341485e022010b263d3c80cafa5ebf1e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:35:53 +0000 Subject: [PATCH 159/162] ASoC: codec duplicated callback function goes to component on wm9712 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm9712.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 488a92224249..e5aafdd85929 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -682,12 +682,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9712 = { .reg_cache_step = 2, .reg_cache_default = wm9712_reg, - .controls = wm9712_snd_ac97_controls, - .num_controls = ARRAY_SIZE(wm9712_snd_ac97_controls), - .dapm_widgets = wm9712_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm9712_dapm_widgets), - .dapm_routes = wm9712_audio_map, - .num_dapm_routes = ARRAY_SIZE(wm9712_audio_map), + .component_driver = { + .controls = wm9712_snd_ac97_controls, + .num_controls = ARRAY_SIZE(wm9712_snd_ac97_controls), + .dapm_widgets = wm9712_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm9712_dapm_widgets), + .dapm_routes = wm9712_audio_map, + .num_dapm_routes = ARRAY_SIZE(wm9712_audio_map), + }, }; static int wm9712_probe(struct platform_device *pdev) From 2c452dd8af9da98b4b0ae1f12f8059160c7b11b5 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 8 Aug 2016 09:36:29 +0000 Subject: [PATCH 160/162] ASoC: codec duplicated callback function goes to component on wm9713 codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm9713.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 9849643ef809..255a7c2d1d65 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1242,12 +1242,14 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9713 = { .resume = wm9713_soc_resume, .set_bias_level = wm9713_set_bias_level, - .controls = wm9713_snd_ac97_controls, - .num_controls = ARRAY_SIZE(wm9713_snd_ac97_controls), - .dapm_widgets = wm9713_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm9713_dapm_widgets), - .dapm_routes = wm9713_audio_map, - .num_dapm_routes = ARRAY_SIZE(wm9713_audio_map), + .component_driver = { + .controls = wm9713_snd_ac97_controls, + .num_controls = ARRAY_SIZE(wm9713_snd_ac97_controls), + .dapm_widgets = wm9713_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm9713_dapm_widgets), + .dapm_routes = wm9713_audio_map, + .num_dapm_routes = ARRAY_SIZE(wm9713_audio_map), + }, }; static int wm9713_probe(struct platform_device *pdev) From f802d6c020658b5dce1732da0d5999a1a65afdd6 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Wed, 31 Aug 2016 23:52:27 +0200 Subject: [PATCH 161/162] ASoC: constify snd_soc_codec_driver structures Check for snd_soc_codec_driver structures that are only passed to snd_soc_register_codec or memcpy (2nd arg), for which the corresponding parameters are declared const. Declare as const snd_soc_codec_driver structures that have these properties. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_soc_codec_driver i@p = { ... }; @ok@ identifier r.i; expression e1,e2,e3; position p; @@ ( snd_soc_register_codec(e1,&i@p,e2,e3) | memcpy(e1,&i@p,e2) ) @bad@ position p != {r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_soc_codec_driver i = { ... }; // Signed-off-by: Julia Lawall Acked-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm0010.c | 2 +- sound/soc/codecs/wm1250-ev1.c | 2 +- sound/soc/codecs/wm2000.c | 2 +- sound/soc/codecs/wm2200.c | 2 +- sound/soc/codecs/wm5100.c | 2 +- sound/soc/codecs/wm5102.c | 2 +- sound/soc/codecs/wm5110.c | 2 +- sound/soc/codecs/wm8350.c | 2 +- sound/soc/codecs/wm8400.c | 2 +- sound/soc/codecs/wm8510.c | 2 +- sound/soc/codecs/wm8523.c | 2 +- sound/soc/codecs/wm8580.c | 2 +- sound/soc/codecs/wm8711.c | 2 +- sound/soc/codecs/wm8727.c | 2 +- sound/soc/codecs/wm8728.c | 2 +- sound/soc/codecs/wm8731.c | 2 +- sound/soc/codecs/wm8737.c | 2 +- sound/soc/codecs/wm8741.c | 2 +- sound/soc/codecs/wm8750.c | 2 +- sound/soc/codecs/wm8753.c | 2 +- sound/soc/codecs/wm8770.c | 2 +- sound/soc/codecs/wm8776.c | 2 +- sound/soc/codecs/wm8782.c | 2 +- sound/soc/codecs/wm8900.c | 2 +- sound/soc/codecs/wm8903.c | 2 +- sound/soc/codecs/wm8904.c | 2 +- sound/soc/codecs/wm8940.c | 2 +- sound/soc/codecs/wm8955.c | 2 +- sound/soc/codecs/wm8960.c | 2 +- sound/soc/codecs/wm8961.c | 2 +- sound/soc/codecs/wm8962.c | 2 +- sound/soc/codecs/wm8971.c | 2 +- sound/soc/codecs/wm8974.c | 2 +- sound/soc/codecs/wm8978.c | 2 +- sound/soc/codecs/wm8983.c | 2 +- sound/soc/codecs/wm8985.c | 2 +- sound/soc/codecs/wm8990.c | 2 +- sound/soc/codecs/wm8991.c | 2 +- sound/soc/codecs/wm8993.c | 2 +- sound/soc/codecs/wm8994.c | 2 +- sound/soc/codecs/wm8996.c | 2 +- sound/soc/codecs/wm8997.c | 2 +- sound/soc/codecs/wm8998.c | 2 +- sound/soc/codecs/wm9081.c | 2 +- sound/soc/codecs/wm9090.c | 2 +- sound/soc/codecs/wm9705.c | 2 +- sound/soc/codecs/wm9712.c | 2 +- sound/soc/codecs/wm9713.c | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index 4ef6919ab1a1..0eb5dcf4c29d 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -789,7 +789,7 @@ static int wm0010_set_sysclk(struct snd_soc_codec *codec, int source, static int wm0010_probe(struct snd_soc_codec *codec); -static struct snd_soc_codec_driver soc_codec_dev_wm0010 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm0010 = { .probe = wm0010_probe, .set_bias_level = wm0010_set_bias_level, .set_sysclk = wm0010_set_sysclk, diff --git a/sound/soc/codecs/wm1250-ev1.c b/sound/soc/codecs/wm1250-ev1.c index caf501227265..cf5f0580df6a 100644 --- a/sound/soc/codecs/wm1250-ev1.c +++ b/sound/soc/codecs/wm1250-ev1.c @@ -141,7 +141,7 @@ static struct snd_soc_dai_driver wm1250_ev1_dai = { .ops = &wm1250_ev1_ops, }; -static struct snd_soc_codec_driver soc_codec_dev_wm1250_ev1 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm1250_ev1 = { .component_driver = { .dapm_widgets = wm1250_ev1_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm1250_ev1_dapm_widgets), diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 1ebaf99a1907..e553f7fd7e63 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -799,7 +799,7 @@ static int wm2000_remove(struct snd_soc_codec *codec) return wm2000_anc_transition(wm2000, ANC_OFF); } -static struct snd_soc_codec_driver soc_codec_dev_wm2000 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm2000 = { .probe = wm2000_probe, .remove = wm2000_remove, .suspend = wm2000_suspend, diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index d913d0e3e9be..606bf88abfc4 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c @@ -2103,7 +2103,7 @@ static struct snd_soc_dai_driver wm2200_dai = { .ops = &wm2200_dai_ops, }; -static struct snd_soc_codec_driver soc_codec_wm2200 = { +static const struct snd_soc_codec_driver soc_codec_wm2200 = { .probe = wm2200_probe, .idle_bias_off = true, diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 8cbdf1701222..278467d3b1ac 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -2381,7 +2381,7 @@ static int wm5100_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm5100 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm5100 = { .probe = wm5100_probe, .remove = wm5100_remove, diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 1295978e8360..05bb3cb02e70 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -1990,7 +1990,7 @@ static struct regmap *wm5102_get_regmap(struct device *dev) return priv->core.arizona->regmap; } -static struct snd_soc_codec_driver soc_codec_dev_wm5102 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm5102 = { .probe = wm5102_codec_probe, .remove = wm5102_codec_remove, .get_regmap = wm5102_get_regmap, diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 3e7f873f2709..e22d3dcb6fd7 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2347,7 +2347,7 @@ static struct regmap *wm5110_get_regmap(struct device *dev) return priv->core.arizona->regmap; } -static struct snd_soc_codec_driver soc_codec_dev_wm5110 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm5110 = { .probe = wm5110_codec_probe, .remove = wm5110_codec_remove, .get_regmap = wm5110_get_regmap, diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index 18bc4ca07fcb..2efc5b41ad0f 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -1587,7 +1587,7 @@ static struct regmap *wm8350_get_regmap(struct device *dev) return wm8350->regmap; } -static struct snd_soc_codec_driver soc_codec_dev_wm8350 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8350 = { .probe = wm8350_codec_probe, .remove = wm8350_codec_remove, .get_regmap = wm8350_get_regmap, diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 4551e54a8d5b..6c59fb933bd6 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c @@ -1332,7 +1332,7 @@ static struct regmap *wm8400_get_regmap(struct device *dev) return wm8400->regmap; } -static struct snd_soc_codec_driver soc_codec_dev_wm8400 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8400 = { .probe = wm8400_codec_probe, .remove = wm8400_codec_remove, .get_regmap = wm8400_get_regmap, diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 7f93adf7118d..119ceac684ae 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c @@ -581,7 +581,7 @@ static int wm8510_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8510 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8510 = { .probe = wm8510_probe, .set_bias_level = wm8510_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index 0bb189a3d322..deb2e075428e 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c @@ -413,7 +413,7 @@ static int wm8523_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8523 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8523 = { .probe = wm8523_probe, .set_bias_level = wm8523_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 2e69270a9015..faa7287a5253 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -899,7 +899,7 @@ static int wm8580_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8580 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8580 = { .probe = wm8580_probe, .remove = wm8580_remove, .set_bias_level = wm8580_set_bias_level, diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 4e8ebefe25f4..2b376c9c99af 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c @@ -367,7 +367,7 @@ static int wm8711_probe(struct snd_soc_codec *codec) } -static struct snd_soc_codec_driver soc_codec_dev_wm8711 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8711 = { .probe = wm8711_probe, .set_bias_level = wm8711_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8727.c b/sound/soc/codecs/wm8727.c index b01e64ec45fd..7fde077a014b 100644 --- a/sound/soc/codecs/wm8727.c +++ b/sound/soc/codecs/wm8727.c @@ -53,7 +53,7 @@ static struct snd_soc_dai_driver wm8727_dai = { }, }; -static struct snd_soc_codec_driver soc_codec_dev_wm8727 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8727 = { .component_driver = { .dapm_widgets = wm8727_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8727_dapm_widgets), diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index dcd64b38bd7d..797cc6e7c70f 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c @@ -211,7 +211,7 @@ static struct snd_soc_dai_driver wm8728_dai = { .ops = &wm8728_dai_ops, }; -static struct snd_soc_codec_driver soc_codec_dev_wm8728 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8728 = { .set_bias_level = wm8728_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 545fc9ae1a94..4f9a1eb28120 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -628,7 +628,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731) return ret; } -static struct snd_soc_codec_driver soc_codec_dev_wm8731 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8731 = { .set_bias_level = wm8731_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8737.c b/sound/soc/codecs/wm8737.c index 728c42cc70ca..f0cb1c4afe3c 100644 --- a/sound/soc/codecs/wm8737.c +++ b/sound/soc/codecs/wm8737.c @@ -573,7 +573,7 @@ static int wm8737_probe(struct snd_soc_codec *codec) return ret; } -static struct snd_soc_codec_driver soc_codec_dev_wm8737 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8737 = { .probe = wm8737_probe, .set_bias_level = wm8737_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index 3e432721903e..565d477cd790 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c @@ -497,7 +497,7 @@ static int wm8741_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8741 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8741 = { .probe = wm8741_probe, .remove = wm8741_remove, .resume = wm8741_resume, diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index a96a1456897b..0da2bbaf06d1 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c @@ -708,7 +708,7 @@ static int wm8750_probe(struct snd_soc_codec *codec) return ret; } -static struct snd_soc_codec_driver soc_codec_dev_wm8750 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8750 = { .probe = wm8750_probe, .set_bias_level = wm8750_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 1bb272c36ad9..9bdf5447f6f6 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -1478,7 +1478,7 @@ static int wm8753_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8753 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8753 = { .probe = wm8753_probe, .resume = wm8753_resume, .set_bias_level = wm8753_set_bias_level, diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index 8783a5fc123e..d6edcbbdec12 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c @@ -608,7 +608,7 @@ static int wm8770_probe(struct snd_soc_codec *codec) return ret; } -static struct snd_soc_codec_driver soc_codec_dev_wm8770 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8770 = { .probe = wm8770_probe, .set_bias_level = wm8770_set_bias_level, .idle_bias_off = true, diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index f17a3a8fffb0..ae30480b3976 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c @@ -425,7 +425,7 @@ static int wm8776_probe(struct snd_soc_codec *codec) return ret; } -static struct snd_soc_codec_driver soc_codec_dev_wm8776 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8776 = { .probe = wm8776_probe, .set_bias_level = wm8776_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index 1e9c4953dc10..bcda21018505 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -50,7 +50,7 @@ static struct snd_soc_dai_driver wm8782_dai = { }, }; -static struct snd_soc_codec_driver soc_codec_dev_wm8782 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8782 = { .component_driver = { .dapm_widgets = wm8782_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8782_dapm_widgets), diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 724cec4a638d..c77b49a29311 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c @@ -1208,7 +1208,7 @@ static int wm8900_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8900 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8900 = { .probe = wm8900_probe, .suspend = wm8900_suspend, .resume = wm8900_resume, diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index c19ba7ca3a35..837c8b9f19e9 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -1874,7 +1874,7 @@ static void wm8903_free_gpio(struct wm8903_priv *wm8903) } #endif -static struct snd_soc_codec_driver soc_codec_dev_wm8903 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8903 = { .resume = wm8903_resume, .set_bias_level = wm8903_set_bias_level, .seq_notifier = wm8903_seq_notifier, diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index edd7a7709194..4fd350e8420d 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -2086,7 +2086,7 @@ static int wm8904_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8904 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8904 = { .probe = wm8904_probe, .remove = wm8904_remove, .set_bias_level = wm8904_set_bias_level, diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 3c9febcc8636..b5935625feeb 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c @@ -723,7 +723,7 @@ static int wm8940_probe(struct snd_soc_codec *codec) return ret; } -static struct snd_soc_codec_driver soc_codec_dev_wm8940 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8940 = { .probe = wm8940_probe, .set_bias_level = wm8940_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 575075d5587e..1edc7b1df31d 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c @@ -940,7 +940,7 @@ static int wm8955_probe(struct snd_soc_codec *codec) return ret; } -static struct snd_soc_codec_driver soc_codec_dev_wm8955 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8955 = { .probe = wm8955_probe, .set_bias_level = wm8955_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index d7f444f87460..be3244361210 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -1264,7 +1264,7 @@ static int wm8960_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8960 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8960 = { .probe = wm8960_probe, .set_bias_level = wm8960_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 4b51761f6816..e23ceac76015 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -882,7 +882,7 @@ static int wm8961_resume(struct snd_soc_codec *codec) #define wm8961_resume NULL #endif -static struct snd_soc_codec_driver soc_codec_dev_wm8961 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8961 = { .probe = wm8961_probe, .resume = wm8961_resume, .set_bias_level = wm8961_set_bias_level, diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index f3109da24769..392b92067011 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3479,7 +3479,7 @@ static int wm8962_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8962 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8962 = { .probe = wm8962_probe, .remove = wm8962_remove, .set_bias_level = wm8962_set_bias_level, diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index 214fa139ff0e..887d31cf3945 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c @@ -649,7 +649,7 @@ static int wm8971_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8971 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8971 = { .probe = wm8971_probe, .set_bias_level = wm8971_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index fbda6e3f8a9d..d414ddd6e197 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c @@ -676,7 +676,7 @@ static int wm8974_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8974 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8974 = { .probe = wm8974_probe, .set_bias_level = wm8974_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 910b36f11264..90b2d418ef60 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -993,7 +993,7 @@ static int wm8978_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8978 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8978 = { .probe = wm8978_probe, .suspend = wm8978_suspend, .resume = wm8978_resume, diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c index 9609fc0e2821..bfdbe72ee687 100644 --- a/sound/soc/codecs/wm8983.c +++ b/sound/soc/codecs/wm8983.c @@ -976,7 +976,7 @@ static struct snd_soc_dai_driver wm8983_dai = { .symmetric_rates = 1 }; -static struct snd_soc_codec_driver soc_codec_dev_wm8983 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8983 = { .probe = wm8983_probe, .set_bias_level = wm8983_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c index bcf34730d507..05344f974ff3 100644 --- a/sound/soc/codecs/wm8985.c +++ b/sound/soc/codecs/wm8985.c @@ -1105,7 +1105,7 @@ static struct snd_soc_dai_driver wm8985_dai = { .symmetric_rates = 1 }; -static struct snd_soc_codec_driver soc_codec_dev_wm8985 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8985 = { .probe = wm8985_probe, .set_bias_level = wm8985_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index a412fd0a2e64..a8945001e696 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c @@ -1294,7 +1294,7 @@ static int wm8990_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8990 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8990 = { .probe = wm8990_probe, .set_bias_level = wm8990_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index 5822d1008f07..984379040794 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c @@ -1232,7 +1232,7 @@ static struct snd_soc_dai_driver wm8991_dai = { .ops = &wm8991_ops }; -static struct snd_soc_codec_driver soc_codec_dev_wm8991 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8991 = { .set_bias_level = wm8991_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 8668c4c391b0..195f7bf6eb22 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c @@ -1613,7 +1613,7 @@ static const struct regmap_config wm8993_regmap = { .num_reg_defaults = ARRAY_SIZE(wm8993_reg_defaults), }; -static struct snd_soc_codec_driver soc_codec_dev_wm8993 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8993 = { .probe = wm8993_probe, .suspend = wm8993_suspend, .resume = wm8993_resume, diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index a18aecb49935..3896523b71e9 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -4439,7 +4439,7 @@ static struct regmap *wm8994_get_regmap(struct device *dev) return control->regmap; } -static struct snd_soc_codec_driver soc_codec_dev_wm8994 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8994 = { .probe = wm8994_codec_probe, .remove = wm8994_codec_remove, .suspend = wm8994_codec_suspend, diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index abacf6c99499..5eba8ffba427 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -2684,7 +2684,7 @@ static int wm8996_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8996 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8996 = { .probe = wm8996_probe, .remove = wm8996_remove, .set_bias_level = wm8996_set_bias_level, diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index cf23a6b76846..2f2821b3382f 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c @@ -1095,7 +1095,7 @@ static struct regmap *wm8997_get_regmap(struct device *dev) return priv->core.arizona->regmap; } -static struct snd_soc_codec_driver soc_codec_dev_wm8997 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8997 = { .probe = wm8997_codec_probe, .remove = wm8997_codec_remove, .get_regmap = wm8997_get_regmap, diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 315b23b836d0..f6d18d77cec2 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -1351,7 +1351,7 @@ static struct regmap *wm8998_get_regmap(struct device *dev) return priv->core.arizona->regmap; } -static struct snd_soc_codec_driver soc_codec_dev_wm8998 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8998 = { .probe = wm8998_codec_probe, .remove = wm8998_codec_remove, .get_regmap = wm8998_get_regmap, diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 30eaf4c92cd8..856867ec2813 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c @@ -1274,7 +1274,7 @@ static int wm9081_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm9081 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm9081 = { .probe = wm9081_probe, .set_sysclk = wm9081_set_sysclk, diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index 5d737290f547..5a131385cb2f 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c @@ -550,7 +550,7 @@ static int wm9090_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm9090 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm9090 = { .probe = wm9090_probe, .set_bias_level = wm9090_set_bias_level, .suspend_bias_off = true, diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index c88492d137fb..dcdd055db57b 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c @@ -352,7 +352,7 @@ static int wm9705_soc_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm9705 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm9705 = { .probe = wm9705_soc_probe, .remove = wm9705_soc_remove, .suspend = wm9705_soc_suspend, diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index e5aafdd85929..557709eac698 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -669,7 +669,7 @@ static int wm9712_soc_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm9712 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm9712 = { .probe = wm9712_soc_probe, .remove = wm9712_soc_remove, .resume = wm9712_soc_resume, diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 255a7c2d1d65..e4301ddb1b84 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1235,7 +1235,7 @@ static int wm9713_soc_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm9713 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm9713 = { .probe = wm9713_soc_probe, .remove = wm9713_soc_remove, .suspend = wm9713_soc_suspend, From 8180bd56bdd1dcade8d1b2a0b6f70b2397bec372 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 22 Sep 2016 11:37:32 +0200 Subject: [PATCH 162/162] ASoC: cq93vc: duplicated callback function goes to component A cleanup removed a couple of members from struct snd_soc_codec_driver after changing codec drivers to no longer use them, but one codec was missed in the process, giving a build error: sound/soc/codecs/cq93vc.c:134:2: error: unknown field 'controls' specified in initializer .controls = cq93vc_snd_controls, This moves the members from the cq93vc codec driver to its component driver just like the other codecs already had. Fixes: 8073aefa6082 ("ASoC: remove codec duplicated callback function") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown --- sound/soc/codecs/cq93vc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c index 1c895a53001d..7a2d9a2ee427 100644 --- a/sound/soc/codecs/cq93vc.c +++ b/sound/soc/codecs/cq93vc.c @@ -131,8 +131,10 @@ static struct regmap *cq93vc_get_regmap(struct device *dev) static struct snd_soc_codec_driver soc_codec_dev_cq93vc = { .set_bias_level = cq93vc_set_bias_level, .get_regmap = cq93vc_get_regmap, - .controls = cq93vc_snd_controls, - .num_controls = ARRAY_SIZE(cq93vc_snd_controls), + .component_driver = { + .controls = cq93vc_snd_controls, + .num_controls = ARRAY_SIZE(cq93vc_snd_controls), + }, }; static int cq93vc_platform_probe(struct platform_device *pdev)