aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2010-09-16 00:06:40 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-09-16 09:14:56 -0400
commit0ce75aa4fe845a8dbbf949cb31e15c06a503b860 (patch)
treec9c6b8095fa73d74c5fb4e28acfb47968a5a4c88
parent19c7ac27a1e6a37f5fb5810ad8ac780c62a204c4 (diff)
ASoC: ak4642: code clean up
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/ak4642.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index c84cc9c00bd9..a95ff4f9f42c 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -422,7 +422,7 @@ static int ak4642_probe(struct snd_soc_codec *codec)
422 dev_info(codec->dev, "AK4642 Audio Codec %s", AK4642_VERSION); 422 dev_info(codec->dev, "AK4642 Audio Codec %s", AK4642_VERSION);
423 423
424 codec->hw_write = (hw_write_t)i2c_master_send; 424 codec->hw_write = (hw_write_t)i2c_master_send;
425 codec->control_data = ak4642->control_data; 425 codec->control_data = ak4642->control_data;
426 426
427 snd_soc_add_controls(codec, ak4642_snd_controls, 427 snd_soc_add_controls(codec, ak4642_snd_controls,
428 ARRAY_SIZE(ak4642_snd_controls)); 428 ARRAY_SIZE(ak4642_snd_controls));
@@ -431,12 +431,12 @@ static int ak4642_probe(struct snd_soc_codec *codec)
431} 431}
432 432
433static struct snd_soc_codec_driver soc_codec_dev_ak4642 = { 433static struct snd_soc_codec_driver soc_codec_dev_ak4642 = {
434 .probe = ak4642_probe, 434 .probe = ak4642_probe,
435 .resume = ak4642_resume, 435 .resume = ak4642_resume,
436 .read = ak4642_read_reg_cache, 436 .read = ak4642_read_reg_cache,
437 .write = ak4642_write, 437 .write = ak4642_write,
438 .reg_cache_size = ARRAY_SIZE(ak4642_reg), 438 .reg_cache_size = ARRAY_SIZE(ak4642_reg),
439 .reg_word_size = sizeof(u8), 439 .reg_word_size = sizeof(u8),
440 .reg_cache_default = ak4642_reg, 440 .reg_cache_default = ak4642_reg,
441}; 441};
442 442
@@ -448,7 +448,7 @@ static __devinit int ak4642_i2c_probe(struct i2c_client *i2c,
448 int ret; 448 int ret;
449 449
450 ak4642 = kzalloc(sizeof(struct ak4642_priv), GFP_KERNEL); 450 ak4642 = kzalloc(sizeof(struct ak4642_priv), GFP_KERNEL);
451 if (ak4642 == NULL) 451 if (!ak4642)
452 return -ENOMEM; 452 return -ENOMEM;
453 453
454 i2c_set_clientdata(i2c, ak4642); 454 i2c_set_clientdata(i2c, ak4642);
@@ -481,9 +481,9 @@ static struct i2c_driver ak4642_i2c_driver = {
481 .name = "ak4642-codec", 481 .name = "ak4642-codec",
482 .owner = THIS_MODULE, 482 .owner = THIS_MODULE,
483 }, 483 },
484 .probe = ak4642_i2c_probe, 484 .probe = ak4642_i2c_probe,
485 .remove = __devexit_p(ak4642_i2c_remove), 485 .remove = __devexit_p(ak4642_i2c_remove),
486 .id_table = ak4642_i2c_id, 486 .id_table = ak4642_i2c_id,
487}; 487};
488#endif 488#endif
489 489