ASoC: cs42l51: re-hook of_match_table pointer
In commita1253ef6d3
("ASoC: cs42l51: split i2c from codec driver"), the I2C part of the CS42L51 was moved to a separate file, but the definition of the of_device_id array was left in the driver file itself, no longer connected to the platform_driver structure using the .of_match_table pointer. This commit exports the of_device_id array in cs42l51, and uses it as .of_match_able in cs42l51-i2c.c. This solution was suggested by Brian Austin. Fixes:a1253ef6d3
("ASoC: cs42l51: split i2c from codec driver") Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
This commit is contained in:
Родитель
f114040e3e
Коммит
2cb1e0259f
|
@ -46,6 +46,7 @@ static struct i2c_driver cs42l51_i2c_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "cs42l51",
|
.name = "cs42l51",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
.of_match_table = cs42l51_of_match,
|
||||||
},
|
},
|
||||||
.probe = cs42l51_i2c_probe,
|
.probe = cs42l51_i2c_probe,
|
||||||
.remove = cs42l51_i2c_remove,
|
.remove = cs42l51_i2c_remove,
|
||||||
|
|
|
@ -558,11 +558,13 @@ error:
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(cs42l51_probe);
|
EXPORT_SYMBOL_GPL(cs42l51_probe);
|
||||||
|
|
||||||
static const struct of_device_id cs42l51_of_match[] = {
|
const struct of_device_id cs42l51_of_match[] = {
|
||||||
{ .compatible = "cirrus,cs42l51", },
|
{ .compatible = "cirrus,cs42l51", },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, cs42l51_of_match);
|
MODULE_DEVICE_TABLE(of, cs42l51_of_match);
|
||||||
|
EXPORT_SYMBOL_GPL(cs42l51_of_match);
|
||||||
|
|
||||||
MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
|
MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
|
||||||
MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver");
|
MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
|
@ -22,6 +22,7 @@ struct device;
|
||||||
|
|
||||||
extern const struct regmap_config cs42l51_regmap;
|
extern const struct regmap_config cs42l51_regmap;
|
||||||
int cs42l51_probe(struct device *dev, struct regmap *regmap);
|
int cs42l51_probe(struct device *dev, struct regmap *regmap);
|
||||||
|
extern const struct of_device_id cs42l51_of_match[];
|
||||||
|
|
||||||
#define CS42L51_CHIP_ID 0x1B
|
#define CS42L51_CHIP_ID 0x1B
|
||||||
#define CS42L51_CHIP_REV_A 0x00
|
#define CS42L51_CHIP_REV_A 0x00
|
||||||
|
|
Загрузка…
Ссылка в новой задаче