瀏覽代碼

staging/iio: (iio_hwmon) Basic devicetree support

Add 'iio-hwmon' OF compatibility table entry to enable OF matches.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Guenter Roeck 12 年之前
父節點
當前提交
a11e619b80
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/staging/iio/iio_hwmon.c

+ 6 - 0
drivers/staging/iio/iio_hwmon.c

@@ -165,10 +165,16 @@ static int iio_hwmon_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct of_device_id iio_hwmon_of_match[] = {
+	{ .compatible = "iio-hwmon", },
+	{ }
+};
+
 static struct platform_driver __refdata iio_hwmon_driver = {
 	.driver = {
 		.name = "iio_hwmon",
 		.owner = THIS_MODULE,
+		.of_match_table = iio_hwmon_of_match,
 	},
 	.probe = iio_hwmon_probe,
 	.remove = iio_hwmon_remove,