提交 aa6b904e 编写于 作者: B Ben Dooks 提交者: Mark Brown

ASoC: tlv320aic3x: fixup board device changes

Fixup the device changes by modifying the files that we just removed the
explicit device creation from with i2c_register_board_info() until this
can be moved into the relevant board files.
Signed-off-by: NBen Dooks <ben@simtec.co.uk>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 cb3826f5
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
#include <sound/soc.h> #include <sound/soc.h>
...@@ -249,6 +250,13 @@ static struct snd_soc_device da850_evm_snd_devdata = { ...@@ -249,6 +250,13 @@ static struct snd_soc_device da850_evm_snd_devdata = {
static struct platform_device *evm_snd_device; static struct platform_device *evm_snd_device;
/* temporary i2c device creation until this can be moved into the machine
* support file.
*/
static struct i2c_board_info i2c_device[] = {
{ I2C_BOARD_INFO("tlv320aic33", 0x1b), }
};
static int __init evm_init(void) static int __init evm_init(void)
{ {
struct snd_soc_device *evm_snd_dev_data; struct snd_soc_device *evm_snd_dev_data;
...@@ -273,6 +281,8 @@ static int __init evm_init(void) ...@@ -273,6 +281,8 @@ static int __init evm_init(void)
} else } else
return -EINVAL; return -EINVAL;
i2c_register_board_info(1, i2c_device, ARRAY_SIZE(i2c_device));
evm_snd_device = platform_device_alloc("soc-audio", index); evm_snd_device = platform_device_alloc("soc-audio", index);
if (!evm_snd_device) if (!evm_snd_device)
return -ENOMEM; return -ENOMEM;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/i2c.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
...@@ -335,6 +336,13 @@ static struct snd_soc_device n810_snd_devdata = { ...@@ -335,6 +336,13 @@ static struct snd_soc_device n810_snd_devdata = {
static struct platform_device *n810_snd_device; static struct platform_device *n810_snd_device;
/* temporary i2c device creation until this can be moved into the machine
* support file.
*/
static struct i2c_board_info i2c_device[] = {
{ I2C_BOARD_INFO("tlv320aic3x", 0x1b), }
};
static int __init n810_soc_init(void) static int __init n810_soc_init(void)
{ {
int err; int err;
...@@ -343,6 +351,8 @@ static int __init n810_soc_init(void) ...@@ -343,6 +351,8 @@ static int __init n810_soc_init(void)
if (!(machine_is_nokia_n810() || machine_is_nokia_n810_wimax())) if (!(machine_is_nokia_n810() || machine_is_nokia_n810_wimax()))
return -ENODEV; return -ENODEV;
i2c_register_board_info(1, i2c_device, ARRAY_SIZE(i2c_device));
n810_snd_device = platform_device_alloc("soc-audio", -1); n810_snd_device = platform_device_alloc("soc-audio", -1);
if (!n810_snd_device) if (!n810_snd_device)
return -ENOMEM; return -ENOMEM;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
#include <sound/soc.h> #include <sound/soc.h>
...@@ -209,10 +210,19 @@ static struct s6000_snd_platform_data __initdata s6105_snd_data = { ...@@ -209,10 +210,19 @@ static struct s6000_snd_platform_data __initdata s6105_snd_data = {
static struct platform_device *s6105_snd_device; static struct platform_device *s6105_snd_device;
/* temporary i2c device creation until this can be moved into the machine
* support file.
*/
static struct i2c_board_info i2c_device[] = {
{ I2C_BOARD_INFO("tlv320aic33", 0x18), }
};
static int __init s6105_init(void) static int __init s6105_init(void)
{ {
int ret; int ret;
i2c_register_board_info(0, i2c_device, ARRAY_SIZE(i2c_device));
s6105_snd_device = platform_device_alloc("soc-audio", -1); s6105_snd_device = platform_device_alloc("soc-audio", -1);
if (!s6105_snd_device) if (!s6105_snd_device)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册