diff options
Diffstat (limited to 'sound/soc/codecs/ak4642.c')
-rw-r--r-- | sound/soc/codecs/ak4642.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index b3e24f289421..546466abb77f 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -194,12 +194,6 @@ static const struct snd_soc_dapm_route ak4642_intercon[] = { | |||
194 | {"LINEOUT Mixer", "DACL", "DAC"}, | 194 | {"LINEOUT Mixer", "DACL", "DAC"}, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | /* codec private data */ | ||
198 | struct ak4642_priv { | ||
199 | unsigned int sysclk; | ||
200 | enum snd_soc_control_type control_type; | ||
201 | }; | ||
202 | |||
203 | /* | 197 | /* |
204 | * ak4642 register cache | 198 | * ak4642 register cache |
205 | */ | 199 | */ |
@@ -468,10 +462,9 @@ static int ak4642_resume(struct snd_soc_codec *codec) | |||
468 | 462 | ||
469 | static int ak4642_probe(struct snd_soc_codec *codec) | 463 | static int ak4642_probe(struct snd_soc_codec *codec) |
470 | { | 464 | { |
471 | struct ak4642_priv *ak4642 = snd_soc_codec_get_drvdata(codec); | ||
472 | int ret; | 465 | int ret; |
473 | 466 | ||
474 | ret = snd_soc_codec_set_cache_io(codec, 8, 8, ak4642->control_type); | 467 | ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C); |
475 | if (ret < 0) { | 468 | if (ret < 0) { |
476 | dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); | 469 | dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); |
477 | return ret; | 470 | return ret; |
@@ -523,21 +516,9 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4648 = { | |||
523 | static __devinit int ak4642_i2c_probe(struct i2c_client *i2c, | 516 | static __devinit int ak4642_i2c_probe(struct i2c_client *i2c, |
524 | const struct i2c_device_id *id) | 517 | const struct i2c_device_id *id) |
525 | { | 518 | { |
526 | struct ak4642_priv *ak4642; | 519 | return snd_soc_register_codec(&i2c->dev, |
527 | int ret; | ||
528 | |||
529 | ak4642 = devm_kzalloc(&i2c->dev, sizeof(struct ak4642_priv), | ||
530 | GFP_KERNEL); | ||
531 | if (!ak4642) | ||
532 | return -ENOMEM; | ||
533 | |||
534 | i2c_set_clientdata(i2c, ak4642); | ||
535 | ak4642->control_type = SND_SOC_I2C; | ||
536 | |||
537 | ret = snd_soc_register_codec(&i2c->dev, | ||
538 | (struct snd_soc_codec_driver *)id->driver_data, | 520 | (struct snd_soc_codec_driver *)id->driver_data, |
539 | &ak4642_dai, 1); | 521 | &ak4642_dai, 1); |
540 | return ret; | ||
541 | } | 522 | } |
542 | 523 | ||
543 | static __devexit int ak4642_i2c_remove(struct i2c_client *client) | 524 | static __devexit int ak4642_i2c_remove(struct i2c_client *client) |