]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: mt9m001: add of_match_table
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 8 Jan 2019 14:51:42 +0000 (12:51 -0200)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 25 Jan 2019 12:49:50 +0000 (10:49 -0200)
Add of_match_table for the MT9M001 CMOS image sensor.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/mt9m001.c

index dc6cf46ed8d007d2e32a1fd59e98b56063f0cf75..3864d884b8c3a6146628a700099c67fe0e463994 100644 (file)
@@ -738,9 +738,16 @@ static const struct i2c_device_id mt9m001_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, mt9m001_id);
 
+static const struct of_device_id mt9m001_of_match[] = {
+       { .compatible = "onnn,mt9m001", },
+       { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt9m001_of_match);
+
 static struct i2c_driver mt9m001_i2c_driver = {
        .driver = {
                .name = "mt9m001",
+               .of_match_table = mt9m001_of_match,
        },
        .probe          = mt9m001_probe,
        .remove         = mt9m001_remove,