diff options
Diffstat (limited to 'sound/soc/codecs/ak4642.c')
-rw-r--r-- | sound/soc/codecs/ak4642.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index e057c7b578df..729859cf6ca8 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/pm.h> | 29 | #include <linux/pm.h> |
30 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
32 | #include <sound/core.h> | 33 | #include <sound/core.h> |
33 | #include <sound/pcm.h> | 34 | #include <sound/pcm.h> |
34 | #include <sound/pcm_params.h> | 35 | #include <sound/pcm_params.h> |
@@ -442,18 +443,9 @@ static int ak4642_probe(struct platform_device *pdev) | |||
442 | goto pcm_err; | 443 | goto pcm_err; |
443 | } | 444 | } |
444 | 445 | ||
445 | ret = snd_soc_init_card(socdev); | ||
446 | if (ret < 0) { | ||
447 | printk(KERN_ERR "ak4642: failed to register card\n"); | ||
448 | goto card_err; | ||
449 | } | ||
450 | |||
451 | dev_info(&pdev->dev, "AK4642 Audio Codec %s", AK4642_VERSION); | 446 | dev_info(&pdev->dev, "AK4642 Audio Codec %s", AK4642_VERSION); |
452 | return ret; | 447 | return ret; |
453 | 448 | ||
454 | card_err: | ||
455 | snd_soc_free_pcms(socdev); | ||
456 | snd_soc_dapm_free(socdev); | ||
457 | pcm_err: | 449 | pcm_err: |
458 | return ret; | 450 | return ret; |
459 | 451 | ||
@@ -479,7 +471,7 @@ EXPORT_SYMBOL_GPL(soc_codec_dev_ak4642); | |||
479 | 471 | ||
480 | static int __init ak4642_modinit(void) | 472 | static int __init ak4642_modinit(void) |
481 | { | 473 | { |
482 | int ret; | 474 | int ret = 0; |
483 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 475 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
484 | ret = i2c_add_driver(&ak4642_i2c_driver); | 476 | ret = i2c_add_driver(&ak4642_i2c_driver); |
485 | #endif | 477 | #endif |