summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/tvp5150.c
diff options
context:
space:
mode:
authorEduard Gavin <egavinc@gmail.com>2016-01-07 15:46:48 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-25 16:59:14 +0300
commit7ef930a7b33677b8227d0a19dcc32d891d3cde8d (patch)
tree101ceddf19dc7b452cec04bcae67c9c74d7ea158 /drivers/media/i2c/tvp5150.c
parenta2e5f1b3a4f12c8c35313a9052a8928b5b85a391 (diff)
downloadlinux-7ef930a7b33677b8227d0a19dcc32d891d3cde8d.tar.xz
[media] tvp5150: Add OF match table
The Documentation/devicetree/bindings/media/i2c/tvp5150.txt DT binding doc lists "ti,tvp5150" as the device compatible string but the driver does not have an OF match table. Add the table to the driver so the I2C core can do an OF style match. Signed-off-by: Eduard Gavin <egavinc@gmail.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/tvp5150.c')
-rw-r--r--drivers/media/i2c/tvp5150.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 57901d613a12..437f1a7ecb96 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -1359,8 +1359,17 @@ static const struct i2c_device_id tvp5150_id[] = {
};
MODULE_DEVICE_TABLE(i2c, tvp5150_id);
+#if IS_ENABLED(CONFIG_OF)
+static const struct of_device_id tvp5150_of_match[] = {
+ { .compatible = "ti,tvp5150", },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, tvp5150_of_match);
+#endif
+
static struct i2c_driver tvp5150_driver = {
.driver = {
+ .of_match_table = of_match_ptr(tvp5150_of_match),
.name = "tvp5150",
},
.probe = tvp5150_probe,