diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-12 12:59:05 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-12 12:59:05 +0000 |
commit | 163849ea9b4c5d50fbd324692461983d18faadad (patch) | |
tree | 7176a18fea53560eb4092aa103d94a266ab4e60d /sound/soc/sh | |
parent | 2138301e1687bd4f22aa2b4df4829b6ffdae19bc (diff) | |
parent | 5ee518ecbcb5934e284ea51a19a939c891f5f7ea (diff) |
Merge branch 'for-2.6.33' into for-2.6.34
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/fsi-ak4642.c | 30 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 2 |
2 files changed, 1 insertions, 31 deletions
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c index c7af09729c6..5263ab18f82 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 = { .codec_dev = &soc_codec_dev_ak4642, }; -#define AK4642_BUS 0 -#define AK4642_ADR 0x12 -static int ak4642_add_i2c_device(void) -{ - struct i2c_board_info info; - struct i2c_adapter *adapter; - struct i2c_client *client; - - memset(&info, 0, sizeof(struct i2c_board_info)); - info.addr = AK4642_ADR; - strlcpy(info.type, "ak4642", I2C_NAME_SIZE); - - adapter = i2c_get_adapter(AK4642_BUS); - if (!adapter) { - printk(KERN_DEBUG "can't get i2c adapter\n"); - return -ENODEV; - } - - client = i2c_new_device(adapter, &info); - i2c_put_adapter(adapter); - if (!client) { - printk(KERN_DEBUG "can't add i2c device\n"); - return -ENODEV; - } - - return 0; -} - static struct platform_device *fsi_snd_device; static int __init fsi_ak4642_init(void) { int ret = -ENOMEM; - ak4642_add_i2c_device(); - fsi_snd_device = platform_device_alloc("soc-audio", -1); if (!fsi_snd_device) goto out; diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 123cd6f45e0..5f9f2693f4e 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -903,7 +903,7 @@ static int fsi_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq = platform_get_irq(pdev, 0); - if (!res || !irq) { + if (!res || (int)irq <= 0) { dev_err(&pdev->dev, "Not enough FSI platform resources.\n"); ret = -ENODEV; goto exit; |