diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2009-12-13 23:22:04 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-12-24 06:41:18 -0500 |
commit | 18f98ab54735f66ea84bf679b70fcec5e8b3df66 (patch) | |
tree | b5b44462fc6ef92c7aebddb2438943d0cd74e1ea /sound/soc/sh | |
parent | 48e3cbb3f67a27d9c2db075f3d0f700246c40caa (diff) |
ASoC: fsi-ak4642: Remove ak4642_add_i2c_device
I2C devices should be registered when platform board setting
in latest ASoC.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/fsi-ak4642.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c index c7af09729c6e..5263ab18f827 100644 --- a/sound/soc/sh/fsi-ak4642.c +++ b/sound/soc/sh/fsi-ak4642.c | |||
@@ -42,42 +42,12 @@ static struct snd_soc_device fsi_snd_devdata = { | |||
42 | .codec_dev = &soc_codec_dev_ak4642, | 42 | .codec_dev = &soc_codec_dev_ak4642, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #define AK4642_BUS 0 | ||
46 | #define AK4642_ADR 0x12 | ||
47 | static int ak4642_add_i2c_device(void) | ||
48 | { | ||
49 | struct i2c_board_info info; | ||
50 | struct i2c_adapter *adapter; | ||
51 | struct i2c_client *client; | ||
52 | |||
53 | memset(&info, 0, sizeof(struct i2c_board_info)); | ||
54 | info.addr = AK4642_ADR; | ||
55 | strlcpy(info.type, "ak4642", I2C_NAME_SIZE); | ||
56 | |||
57 | adapter = i2c_get_adapter(AK4642_BUS); | ||
58 | if (!adapter) { | ||
59 | printk(KERN_DEBUG "can't get i2c adapter\n"); | ||
60 | return -ENODEV; | ||
61 | } | ||
62 | |||
63 | client = i2c_new_device(adapter, &info); | ||
64 | i2c_put_adapter(adapter); | ||
65 | if (!client) { | ||
66 | printk(KERN_DEBUG "can't add i2c device\n"); | ||
67 | return -ENODEV; | ||
68 | } | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static struct platform_device *fsi_snd_device; | 45 | static struct platform_device *fsi_snd_device; |
74 | 46 | ||
75 | static int __init fsi_ak4642_init(void) | 47 | static int __init fsi_ak4642_init(void) |
76 | { | 48 | { |
77 | int ret = -ENOMEM; | 49 | int ret = -ENOMEM; |
78 | 50 | ||
79 | ak4642_add_i2c_device(); | ||
80 | |||
81 | fsi_snd_device = platform_device_alloc("soc-audio", -1); | 51 | fsi_snd_device = platform_device_alloc("soc-audio", -1); |
82 | if (!fsi_snd_device) | 52 | if (!fsi_snd_device) |
83 | goto out; | 53 | goto out; |