aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/alc5625/alc5625.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/alc5625/alc5625.c')
-rw-r--r--drivers/staging/alc5625/alc5625.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/staging/alc5625/alc5625.c b/drivers/staging/alc5625/alc5625.c
index 8f1ae4c869e..33f37f93bde 100644
--- a/drivers/staging/alc5625/alc5625.c
+++ b/drivers/staging/alc5625/alc5625.c
@@ -2206,26 +2206,32 @@ static __devinit int alc5625_i2c_probe(struct i2c_client *i2c,
struct alc5625_priv *alc5625;
int ret;
+ printk("%s(%d)\n", __func__, __LINE__);
+
alc5625 = kzalloc(sizeof(struct alc5625_priv), GFP_KERNEL);
if (alc5625 == NULL)
return -ENOMEM;
+ printk("%s(%d)\n", __func__, __LINE__);
alc5625->regmap = regmap_init_i2c(i2c, &alc5625_i2c_regmap_config);
if (IS_ERR(alc5625->regmap)) {
ret = PTR_ERR(alc5625->regmap);
goto err_free;
}
+ printk("%s(%d)\n", __func__, __LINE__);
i2c_set_clientdata(i2c, alc5625);
alc5625->control_data = i2c;
alc5625->control_type = SND_SOC_REGMAP;
+ printk("%s(%d)\n", __func__, __LINE__);
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_alc5625,
alc5625_dai, ARRAY_SIZE(alc5625_dai));
if (ret < 0)
goto err_regmap;
+ printk("%s(%d) ret=%d\n", __func__, __LINE__, ret);
return ret;
err_regmap:
@@ -2233,6 +2239,7 @@ err_regmap:
err_free:
if (ret < 0)
kfree(alc5625);
+ printk("%s(%d) ret=%d\n", __func__, __LINE__, ret);
return ret;
}
@@ -2252,18 +2259,25 @@ static const struct i2c_device_id alc5625_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, alc5625_i2c_id);
+static const struct of_device_id alc5625_of_match[] = {
+ { .compatible = "realtek,alc5625", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, alc5625_of_match);
+
static struct i2c_driver alc5625_i2c_driver = {
.driver = {
.name = "alc5625-codec",
.owner = THIS_MODULE,
+ .of_match_table = alc5625_of_match,
},
.probe = alc5625_i2c_probe,
.remove = __devexit_p(alc5625_i2c_remove),
.id_table = alc5625_i2c_id,
};
-#endif
module_i2c_driver(alc5625_i2c_driver);
+#endif
MODULE_DESCRIPTION("ASoC ALC5625 driver");
MODULE_LICENSE("GPL");