diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-01-28 23:10:06 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-12 04:50:24 -0500 |
commit | a05655877f8f514431158a3f406ae10b4b6c4af3 (patch) | |
tree | 275e09d2a4ba937142dca2a83e7b739bd6ae2c28 | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) |
ASoC: adav80x: replace codec to component
Now we can replace Codec to Component. Let's do it.
Note:
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 0 -> .idle_bias_on = 1
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/adav801.c | 7 | ||||
-rw-r--r-- | sound/soc/codecs/adav803.c | 7 | ||||
-rw-r--r-- | sound/soc/codecs/adav80x.c | 130 |
3 files changed, 65 insertions, 79 deletions
diff --git a/sound/soc/codecs/adav801.c b/sound/soc/codecs/adav801.c index 055f1228c2b4..d82f79dd1b38 100644 --- a/sound/soc/codecs/adav801.c +++ b/sound/soc/codecs/adav801.c | |||
@@ -30,18 +30,11 @@ static int adav80x_spi_probe(struct spi_device *spi) | |||
30 | return adav80x_bus_probe(&spi->dev, devm_regmap_init_spi(spi, &config)); | 30 | return adav80x_bus_probe(&spi->dev, devm_regmap_init_spi(spi, &config)); |
31 | } | 31 | } |
32 | 32 | ||
33 | static int adav80x_spi_remove(struct spi_device *spi) | ||
34 | { | ||
35 | snd_soc_unregister_codec(&spi->dev); | ||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | static struct spi_driver adav80x_spi_driver = { | 33 | static struct spi_driver adav80x_spi_driver = { |
40 | .driver = { | 34 | .driver = { |
41 | .name = "adav801", | 35 | .name = "adav801", |
42 | }, | 36 | }, |
43 | .probe = adav80x_spi_probe, | 37 | .probe = adav80x_spi_probe, |
44 | .remove = adav80x_spi_remove, | ||
45 | .id_table = adav80x_spi_id, | 38 | .id_table = adav80x_spi_id, |
46 | }; | 39 | }; |
47 | module_spi_driver(adav80x_spi_driver); | 40 | module_spi_driver(adav80x_spi_driver); |
diff --git a/sound/soc/codecs/adav803.c b/sound/soc/codecs/adav803.c index 52881faedcf6..deb14bc0f1f7 100644 --- a/sound/soc/codecs/adav803.c +++ b/sound/soc/codecs/adav803.c | |||
@@ -27,18 +27,11 @@ static int adav803_probe(struct i2c_client *client, | |||
27 | devm_regmap_init_i2c(client, &adav80x_regmap_config)); | 27 | devm_regmap_init_i2c(client, &adav80x_regmap_config)); |
28 | } | 28 | } |
29 | 29 | ||
30 | static int adav803_remove(struct i2c_client *client) | ||
31 | { | ||
32 | snd_soc_unregister_codec(&client->dev); | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static struct i2c_driver adav803_driver = { | 30 | static struct i2c_driver adav803_driver = { |
37 | .driver = { | 31 | .driver = { |
38 | .name = "adav803", | 32 | .name = "adav803", |
39 | }, | 33 | }, |
40 | .probe = adav803_probe, | 34 | .probe = adav803_probe, |
41 | .remove = adav803_remove, | ||
42 | .id_table = adav803_id, | 35 | .id_table = adav803_id, |
43 | }; | 36 | }; |
44 | module_i2c_driver(adav803_driver); | 37 | module_i2c_driver(adav803_driver); |
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index da7ca81f47cf..db21ecbe0762 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c | |||
@@ -212,8 +212,8 @@ static const struct snd_soc_dapm_widget adav80x_dapm_widgets[] = { | |||
212 | static int adav80x_dapm_sysclk_check(struct snd_soc_dapm_widget *source, | 212 | static int adav80x_dapm_sysclk_check(struct snd_soc_dapm_widget *source, |
213 | struct snd_soc_dapm_widget *sink) | 213 | struct snd_soc_dapm_widget *sink) |
214 | { | 214 | { |
215 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); | 215 | struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); |
216 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 216 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
217 | const char *clk; | 217 | const char *clk; |
218 | 218 | ||
219 | switch (adav80x->clk_src) { | 219 | switch (adav80x->clk_src) { |
@@ -236,8 +236,8 @@ static int adav80x_dapm_sysclk_check(struct snd_soc_dapm_widget *source, | |||
236 | static int adav80x_dapm_pll_check(struct snd_soc_dapm_widget *source, | 236 | static int adav80x_dapm_pll_check(struct snd_soc_dapm_widget *source, |
237 | struct snd_soc_dapm_widget *sink) | 237 | struct snd_soc_dapm_widget *sink) |
238 | { | 238 | { |
239 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); | 239 | struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); |
240 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 240 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
241 | 241 | ||
242 | return adav80x->pll_src == ADAV80X_PLL_SRC_XTAL; | 242 | return adav80x->pll_src == ADAV80X_PLL_SRC_XTAL; |
243 | } | 243 | } |
@@ -281,9 +281,9 @@ static const struct snd_soc_dapm_route adav80x_dapm_routes[] = { | |||
281 | { "AIFAUXIN", NULL, "SYSCLK" }, | 281 | { "AIFAUXIN", NULL, "SYSCLK" }, |
282 | }; | 282 | }; |
283 | 283 | ||
284 | static int adav80x_set_deemph(struct snd_soc_codec *codec) | 284 | static int adav80x_set_deemph(struct snd_soc_component *component) |
285 | { | 285 | { |
286 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 286 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
287 | unsigned int val; | 287 | unsigned int val; |
288 | 288 | ||
289 | if (adav80x->deemph) { | 289 | if (adav80x->deemph) { |
@@ -315,8 +315,8 @@ static int adav80x_set_deemph(struct snd_soc_codec *codec) | |||
315 | static int adav80x_put_deemph(struct snd_kcontrol *kcontrol, | 315 | static int adav80x_put_deemph(struct snd_kcontrol *kcontrol, |
316 | struct snd_ctl_elem_value *ucontrol) | 316 | struct snd_ctl_elem_value *ucontrol) |
317 | { | 317 | { |
318 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | 318 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); |
319 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 319 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
320 | unsigned int deemph = ucontrol->value.integer.value[0]; | 320 | unsigned int deemph = ucontrol->value.integer.value[0]; |
321 | 321 | ||
322 | if (deemph > 1) | 322 | if (deemph > 1) |
@@ -324,14 +324,14 @@ static int adav80x_put_deemph(struct snd_kcontrol *kcontrol, | |||
324 | 324 | ||
325 | adav80x->deemph = deemph; | 325 | adav80x->deemph = deemph; |
326 | 326 | ||
327 | return adav80x_set_deemph(codec); | 327 | return adav80x_set_deemph(component); |
328 | } | 328 | } |
329 | 329 | ||
330 | static int adav80x_get_deemph(struct snd_kcontrol *kcontrol, | 330 | static int adav80x_get_deemph(struct snd_kcontrol *kcontrol, |
331 | struct snd_ctl_elem_value *ucontrol) | 331 | struct snd_ctl_elem_value *ucontrol) |
332 | { | 332 | { |
333 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | 333 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); |
334 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 334 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
335 | 335 | ||
336 | ucontrol->value.integer.value[0] = adav80x->deemph; | 336 | ucontrol->value.integer.value[0] = adav80x->deemph; |
337 | return 0; | 337 | return 0; |
@@ -365,8 +365,8 @@ static unsigned int adav80x_port_ctrl_regs[2][2] = { | |||
365 | 365 | ||
366 | static int adav80x_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) | 366 | static int adav80x_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) |
367 | { | 367 | { |
368 | struct snd_soc_codec *codec = dai->codec; | 368 | struct snd_soc_component *component = dai->component; |
369 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 369 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
370 | unsigned int capture = 0x00; | 370 | unsigned int capture = 0x00; |
371 | unsigned int playback = 0x00; | 371 | unsigned int playback = 0x00; |
372 | 372 | ||
@@ -415,10 +415,10 @@ static int adav80x_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
415 | return 0; | 415 | return 0; |
416 | } | 416 | } |
417 | 417 | ||
418 | static int adav80x_set_adc_clock(struct snd_soc_codec *codec, | 418 | static int adav80x_set_adc_clock(struct snd_soc_component *component, |
419 | unsigned int sample_rate) | 419 | unsigned int sample_rate) |
420 | { | 420 | { |
421 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 421 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
422 | unsigned int val; | 422 | unsigned int val; |
423 | 423 | ||
424 | if (sample_rate <= 48000) | 424 | if (sample_rate <= 48000) |
@@ -432,10 +432,10 @@ static int adav80x_set_adc_clock(struct snd_soc_codec *codec, | |||
432 | return 0; | 432 | return 0; |
433 | } | 433 | } |
434 | 434 | ||
435 | static int adav80x_set_dac_clock(struct snd_soc_codec *codec, | 435 | static int adav80x_set_dac_clock(struct snd_soc_component *component, |
436 | unsigned int sample_rate) | 436 | unsigned int sample_rate) |
437 | { | 437 | { |
438 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 438 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
439 | unsigned int val; | 439 | unsigned int val; |
440 | 440 | ||
441 | if (sample_rate <= 48000) | 441 | if (sample_rate <= 48000) |
@@ -450,10 +450,10 @@ static int adav80x_set_dac_clock(struct snd_soc_codec *codec, | |||
450 | return 0; | 450 | return 0; |
451 | } | 451 | } |
452 | 452 | ||
453 | static int adav80x_set_capture_pcm_format(struct snd_soc_codec *codec, | 453 | static int adav80x_set_capture_pcm_format(struct snd_soc_component *component, |
454 | struct snd_soc_dai *dai, struct snd_pcm_hw_params *params) | 454 | struct snd_soc_dai *dai, struct snd_pcm_hw_params *params) |
455 | { | 455 | { |
456 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 456 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
457 | unsigned int val; | 457 | unsigned int val; |
458 | 458 | ||
459 | switch (params_width(params)) { | 459 | switch (params_width(params)) { |
@@ -479,10 +479,10 @@ static int adav80x_set_capture_pcm_format(struct snd_soc_codec *codec, | |||
479 | return 0; | 479 | return 0; |
480 | } | 480 | } |
481 | 481 | ||
482 | static int adav80x_set_playback_pcm_format(struct snd_soc_codec *codec, | 482 | static int adav80x_set_playback_pcm_format(struct snd_soc_component *component, |
483 | struct snd_soc_dai *dai, struct snd_pcm_hw_params *params) | 483 | struct snd_soc_dai *dai, struct snd_pcm_hw_params *params) |
484 | { | 484 | { |
485 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 485 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
486 | unsigned int val; | 486 | unsigned int val; |
487 | 487 | ||
488 | if (adav80x->dai_fmt[dai->id] != SND_SOC_DAIFMT_RIGHT_J) | 488 | if (adav80x->dai_fmt[dai->id] != SND_SOC_DAIFMT_RIGHT_J) |
@@ -514,32 +514,32 @@ static int adav80x_set_playback_pcm_format(struct snd_soc_codec *codec, | |||
514 | static int adav80x_hw_params(struct snd_pcm_substream *substream, | 514 | static int adav80x_hw_params(struct snd_pcm_substream *substream, |
515 | struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) | 515 | struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) |
516 | { | 516 | { |
517 | struct snd_soc_codec *codec = dai->codec; | 517 | struct snd_soc_component *component = dai->component; |
518 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 518 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
519 | unsigned int rate = params_rate(params); | 519 | unsigned int rate = params_rate(params); |
520 | 520 | ||
521 | if (rate * 256 != adav80x->sysclk) | 521 | if (rate * 256 != adav80x->sysclk) |
522 | return -EINVAL; | 522 | return -EINVAL; |
523 | 523 | ||
524 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 524 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
525 | adav80x_set_playback_pcm_format(codec, dai, params); | 525 | adav80x_set_playback_pcm_format(component, dai, params); |
526 | adav80x_set_dac_clock(codec, rate); | 526 | adav80x_set_dac_clock(component, rate); |
527 | } else { | 527 | } else { |
528 | adav80x_set_capture_pcm_format(codec, dai, params); | 528 | adav80x_set_capture_pcm_format(component, dai, params); |
529 | adav80x_set_adc_clock(codec, rate); | 529 | adav80x_set_adc_clock(component, rate); |
530 | } | 530 | } |
531 | adav80x->rate = rate; | 531 | adav80x->rate = rate; |
532 | adav80x_set_deemph(codec); | 532 | adav80x_set_deemph(component); |
533 | 533 | ||
534 | return 0; | 534 | return 0; |
535 | } | 535 | } |
536 | 536 | ||
537 | static int adav80x_set_sysclk(struct snd_soc_codec *codec, | 537 | static int adav80x_set_sysclk(struct snd_soc_component *component, |
538 | int clk_id, int source, | 538 | int clk_id, int source, |
539 | unsigned int freq, int dir) | 539 | unsigned int freq, int dir) |
540 | { | 540 | { |
541 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 541 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
542 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); | 542 | struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); |
543 | 543 | ||
544 | if (dir == SND_SOC_CLOCK_IN) { | 544 | if (dir == SND_SOC_CLOCK_IN) { |
545 | switch (clk_id) { | 545 | switch (clk_id) { |
@@ -619,11 +619,11 @@ static int adav80x_set_sysclk(struct snd_soc_codec *codec, | |||
619 | return 0; | 619 | return 0; |
620 | } | 620 | } |
621 | 621 | ||
622 | static int adav80x_set_pll(struct snd_soc_codec *codec, int pll_id, | 622 | static int adav80x_set_pll(struct snd_soc_component *component, int pll_id, |
623 | int source, unsigned int freq_in, unsigned int freq_out) | 623 | int source, unsigned int freq_in, unsigned int freq_out) |
624 | { | 624 | { |
625 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); | 625 | struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); |
626 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 626 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
627 | unsigned int pll_ctrl1 = 0; | 627 | unsigned int pll_ctrl1 = 0; |
628 | unsigned int pll_ctrl2 = 0; | 628 | unsigned int pll_ctrl2 = 0; |
629 | unsigned int pll_src; | 629 | unsigned int pll_src; |
@@ -694,10 +694,10 @@ static int adav80x_set_pll(struct snd_soc_codec *codec, int pll_id, | |||
694 | return 0; | 694 | return 0; |
695 | } | 695 | } |
696 | 696 | ||
697 | static int adav80x_set_bias_level(struct snd_soc_codec *codec, | 697 | static int adav80x_set_bias_level(struct snd_soc_component *component, |
698 | enum snd_soc_bias_level level) | 698 | enum snd_soc_bias_level level) |
699 | { | 699 | { |
700 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 700 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
701 | unsigned int mask = ADAV80X_DAC_CTRL1_PD; | 701 | unsigned int mask = ADAV80X_DAC_CTRL1_PD; |
702 | 702 | ||
703 | switch (level) { | 703 | switch (level) { |
@@ -722,10 +722,10 @@ static int adav80x_set_bias_level(struct snd_soc_codec *codec, | |||
722 | static int adav80x_dai_startup(struct snd_pcm_substream *substream, | 722 | static int adav80x_dai_startup(struct snd_pcm_substream *substream, |
723 | struct snd_soc_dai *dai) | 723 | struct snd_soc_dai *dai) |
724 | { | 724 | { |
725 | struct snd_soc_codec *codec = dai->codec; | 725 | struct snd_soc_component *component = dai->component; |
726 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 726 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
727 | 727 | ||
728 | if (!snd_soc_codec_is_active(codec) || !adav80x->rate) | 728 | if (!snd_soc_component_is_active(component) || !adav80x->rate) |
729 | return 0; | 729 | return 0; |
730 | 730 | ||
731 | return snd_pcm_hw_constraint_single(substream->runtime, | 731 | return snd_pcm_hw_constraint_single(substream->runtime, |
@@ -735,10 +735,10 @@ static int adav80x_dai_startup(struct snd_pcm_substream *substream, | |||
735 | static void adav80x_dai_shutdown(struct snd_pcm_substream *substream, | 735 | static void adav80x_dai_shutdown(struct snd_pcm_substream *substream, |
736 | struct snd_soc_dai *dai) | 736 | struct snd_soc_dai *dai) |
737 | { | 737 | { |
738 | struct snd_soc_codec *codec = dai->codec; | 738 | struct snd_soc_component *component = dai->component; |
739 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 739 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
740 | 740 | ||
741 | if (!snd_soc_codec_is_active(codec)) | 741 | if (!snd_soc_component_is_active(component)) |
742 | adav80x->rate = 0; | 742 | adav80x->rate = 0; |
743 | } | 743 | } |
744 | 744 | ||
@@ -799,10 +799,10 @@ static struct snd_soc_dai_driver adav80x_dais[] = { | |||
799 | }, | 799 | }, |
800 | }; | 800 | }; |
801 | 801 | ||
802 | static int adav80x_probe(struct snd_soc_codec *codec) | 802 | static int adav80x_probe(struct snd_soc_component *component) |
803 | { | 803 | { |
804 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); | 804 | struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); |
805 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 805 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
806 | 806 | ||
807 | /* Force PLLs on for SYSCLK output */ | 807 | /* Force PLLs on for SYSCLK output */ |
808 | snd_soc_dapm_force_enable_pin(dapm, "PLL1"); | 808 | snd_soc_dapm_force_enable_pin(dapm, "PLL1"); |
@@ -816,32 +816,32 @@ static int adav80x_probe(struct snd_soc_codec *codec) | |||
816 | return 0; | 816 | return 0; |
817 | } | 817 | } |
818 | 818 | ||
819 | static int adav80x_resume(struct snd_soc_codec *codec) | 819 | static int adav80x_resume(struct snd_soc_component *component) |
820 | { | 820 | { |
821 | struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); | 821 | struct adav80x *adav80x = snd_soc_component_get_drvdata(component); |
822 | 822 | ||
823 | regcache_sync(adav80x->regmap); | 823 | regcache_sync(adav80x->regmap); |
824 | 824 | ||
825 | return 0; | 825 | return 0; |
826 | } | 826 | } |
827 | 827 | ||
828 | static const struct snd_soc_codec_driver adav80x_codec_driver = { | 828 | static const struct snd_soc_component_driver adav80x_component_driver = { |
829 | .probe = adav80x_probe, | 829 | .probe = adav80x_probe, |
830 | .resume = adav80x_resume, | 830 | .resume = adav80x_resume, |
831 | .set_bias_level = adav80x_set_bias_level, | 831 | .set_bias_level = adav80x_set_bias_level, |
832 | .suspend_bias_off = true, | 832 | .set_pll = adav80x_set_pll, |
833 | 833 | .set_sysclk = adav80x_set_sysclk, | |
834 | .set_pll = adav80x_set_pll, | 834 | .controls = adav80x_controls, |
835 | .set_sysclk = adav80x_set_sysclk, | 835 | .num_controls = ARRAY_SIZE(adav80x_controls), |
836 | 836 | .dapm_widgets = adav80x_dapm_widgets, | |
837 | .component_driver = { | 837 | .num_dapm_widgets = ARRAY_SIZE(adav80x_dapm_widgets), |
838 | .controls = adav80x_controls, | 838 | .dapm_routes = adav80x_dapm_routes, |
839 | .num_controls = ARRAY_SIZE(adav80x_controls), | 839 | .num_dapm_routes = ARRAY_SIZE(adav80x_dapm_routes), |
840 | .dapm_widgets = adav80x_dapm_widgets, | 840 | .suspend_bias_off = 1, |
841 | .num_dapm_widgets = ARRAY_SIZE(adav80x_dapm_widgets), | 841 | .idle_bias_on = 1, |
842 | .dapm_routes = adav80x_dapm_routes, | 842 | .use_pmdown_time = 1, |
843 | .num_dapm_routes = ARRAY_SIZE(adav80x_dapm_routes), | 843 | .endianness = 1, |
844 | }, | 844 | .non_legacy_dai_naming = 1, |
845 | }; | 845 | }; |
846 | 846 | ||
847 | int adav80x_bus_probe(struct device *dev, struct regmap *regmap) | 847 | int adav80x_bus_probe(struct device *dev, struct regmap *regmap) |
@@ -858,7 +858,7 @@ int adav80x_bus_probe(struct device *dev, struct regmap *regmap) | |||
858 | dev_set_drvdata(dev, adav80x); | 858 | dev_set_drvdata(dev, adav80x); |
859 | adav80x->regmap = regmap; | 859 | adav80x->regmap = regmap; |
860 | 860 | ||
861 | return snd_soc_register_codec(dev, &adav80x_codec_driver, | 861 | return devm_snd_soc_register_component(dev, &adav80x_component_driver, |
862 | adav80x_dais, ARRAY_SIZE(adav80x_dais)); | 862 | adav80x_dais, ARRAY_SIZE(adav80x_dais)); |
863 | } | 863 | } |
864 | EXPORT_SYMBOL_GPL(adav80x_bus_probe); | 864 | EXPORT_SYMBOL_GPL(adav80x_bus_probe); |