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

Commit e17ff2de authored by Caesar Wang's avatar Caesar Wang Committed by Mark Brown
Browse files

ASoC: rt5616: add an of_match table



Add a device tree match table. This serves to make the driver's support
of device tree more explicit.

Signed-off-by: default avatarCaesar Wang <wxt@rock-chips.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 36ddd489
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -1287,6 +1287,14 @@ static const struct i2c_device_id rt5616_i2c_id[] = {
};
};
MODULE_DEVICE_TABLE(i2c, rt5616_i2c_id);
MODULE_DEVICE_TABLE(i2c, rt5616_i2c_id);


#if defined(CONFIG_OF)
static const struct of_device_id rt5616_of_match[] = {
	{ .compatible = "realtek,rt5616", },
	{},
};
MODULE_DEVICE_TABLE(of, rt5616_of_match);
#endif

static int rt5616_i2c_probe(struct i2c_client *i2c,
static int rt5616_i2c_probe(struct i2c_client *i2c,
		    const struct i2c_device_id *id)
		    const struct i2c_device_id *id)
{
{
@@ -1359,6 +1367,7 @@ static void rt5616_i2c_shutdown(struct i2c_client *client)
static struct i2c_driver rt5616_i2c_driver = {
static struct i2c_driver rt5616_i2c_driver = {
	.driver = {
	.driver = {
		.name = "rt5616",
		.name = "rt5616",
		.of_match_table = of_match_ptr(rt5616_of_match),
	},
	},
	.probe = rt5616_i2c_probe,
	.probe = rt5616_i2c_probe,
	.remove = rt5616_i2c_remove,
	.remove = rt5616_i2c_remove,