staging:iio: isl29018: add of_match table for device-tree probing
authorOlof Johansson <olof@lixom.net>
Fri, 23 Dec 2011 02:44:43 +0000 (18:44 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 18:03:51 +0000 (10:03 -0800)
As simple as can be right now; just one ID and no custom properties to parse.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/light/isl29018.c

index 849d6a564afa956002a6b18610042d25abdcbd9a..38ec52b65dfa765bc48f6b30252f550fcb17ff14 100644 (file)
@@ -592,11 +592,18 @@ static const struct i2c_device_id isl29018_id[] = {
 
 MODULE_DEVICE_TABLE(i2c, isl29018_id);
 
+static const struct of_device_id isl29018_of_match[] = {
+       { .compatible = "invn,isl29018", },
+       { },
+};
+MODULE_DEVICE_TABLE(of, isl29018_of_match);
+
 static struct i2c_driver isl29018_driver = {
        .class  = I2C_CLASS_HWMON,
        .driver  = {
                        .name = "isl29018",
                        .owner = THIS_MODULE,
+                       .of_match_table = isl29018_of_match,
                    },
        .probe   = isl29018_probe,
        .remove  = __devexit_p(isl29018_remove),