ASoC: cs42xx8: Setup of_match_table
authorAxel Lin <axel.lin@ingics.com>
Thu, 25 Jun 2015 13:44:13 +0000 (21:44 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 7 Jul 2015 12:35:13 +0000 (13:35 +0100)
Setup of_match_table and since cs42xx8_of_match is exported and used in
cs42xx8-i2c.c, it cannot be static.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42xx8-i2c.c
sound/soc/codecs/cs42xx8.c
sound/soc/codecs/cs42xx8.h

index 657dce27eade332b94696d486f566519dd8483dc..5a71c9e5b4417621f8f48b236769064b2c40a3df 100644 (file)
@@ -20,7 +20,7 @@
 static int cs42xx8_i2c_probe(struct i2c_client *i2c,
                             const struct i2c_device_id *id)
 {
-       u32 ret = cs42xx8_probe(&i2c->dev,
+       int ret = cs42xx8_probe(&i2c->dev,
                        devm_regmap_init_i2c(i2c, &cs42xx8_regmap_config));
        if (ret)
                return ret;
@@ -51,6 +51,7 @@ static struct i2c_driver cs42xx8_i2c_driver = {
                .name = "cs42xx8",
                .owner = THIS_MODULE,
                .pm = &cs42xx8_pm,
+               .of_match_table = cs42xx8_of_match,
        },
        .probe = cs42xx8_i2c_probe,
        .remove = cs42xx8_i2c_remove,
index ab395144b23279bae9d7d6c14aace2e8fcd4bf3c..d562e1b9a5d163bb22e990280b8f2e396e584846 100644 (file)
@@ -425,7 +425,7 @@ const struct cs42xx8_driver_data cs42888_data = {
 };
 EXPORT_SYMBOL_GPL(cs42888_data);
 
-static const struct of_device_id cs42xx8_of_match[] = {
+const struct of_device_id cs42xx8_of_match[] = {
        { .compatible = "cirrus,cs42448", .data = &cs42448_data, },
        { .compatible = "cirrus,cs42888", .data = &cs42888_data, },
        { /* sentinel */ }
index b2c10e537ef6c89a71a6239da05a13a78cf5977d..d36c61b6df74725fda9feff92d4ab9efea703840 100644 (file)
@@ -22,6 +22,7 @@ extern const struct dev_pm_ops cs42xx8_pm;
 extern const struct cs42xx8_driver_data cs42448_data;
 extern const struct cs42xx8_driver_data cs42888_data;
 extern const struct regmap_config cs42xx8_regmap_config;
+extern const struct of_device_id cs42xx8_of_match[];
 int cs42xx8_probe(struct device *dev, struct regmap *regmap);
 
 /* CS42888 register map */