Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f18b4e2e authored by Stephen Warren's avatar Stephen Warren Committed by Mark Brown
Browse files

ASoC: WM8903: Add of_match_table



This allows the device to be matched against the device tree using the
compatible flag directly, as is standard, rather than falling back to
matching .id_table against the non-vendor portion of the first compatible
property value.

Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 21abbb02
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -2201,6 +2201,12 @@ static __devexit int wm8903_i2c_remove(struct i2c_client *client)
	return 0;
	return 0;
}
}


static const struct of_device_id wm8903_of_match[] = {
	{ .compatible = "wlf,wm8903", },
	{},
};
MODULE_DEVICE_TABLE(of, wm8903_of_match);

static const struct i2c_device_id wm8903_i2c_id[] = {
static const struct i2c_device_id wm8903_i2c_id[] = {
	{ "wm8903", 0 },
	{ "wm8903", 0 },
	{ }
	{ }
@@ -2211,6 +2217,7 @@ static struct i2c_driver wm8903_i2c_driver = {
	.driver = {
	.driver = {
		.name = "wm8903",
		.name = "wm8903",
		.owner = THIS_MODULE,
		.owner = THIS_MODULE,
		.of_match_table = wm8903_of_match,
	},
	},
	.probe =    wm8903_i2c_probe,
	.probe =    wm8903_i2c_probe,
	.remove =   __devexit_p(wm8903_i2c_remove),
	.remove =   __devexit_p(wm8903_i2c_remove),