dt: Add default match table for bus ids
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 21 Jun 2011 16:59:34 +0000 (10:59 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 21 Jun 2011 17:02:29 +0000 (11:02 -0600)
No need for most platforms to define their own bus table when calling
of_platform_populate().  Supply a stock one.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/of/platform.c
include/linux/of_platform.h

index 63d3cb73bdb9ac31b46efa252d0075e5c6c16c0a..bb483ef32e00c6ab1a0a4109e3aaee9cb8c5f21e 100644 (file)
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
 
+const struct of_device_id of_default_bus_match_table[] = {
+       { .compatible = "simple-bus", },
+#ifdef CONFIG_ARM_AMBA
+       { .compatible = "arm,amba-bus", },
+#endif /* CONFIG_ARM_AMBA */
+       {} /* Empty terminated list */
+};
+
 static int of_dev_node_match(struct device *dev, void *data)
 {
        return dev->of_node == data;
index fb51ae38cea7b6cdf6497670147da05b41af5aea..8f023f889a8a21915c45e4ab1445e471e178cb86 100644 (file)
@@ -40,6 +40,8 @@ struct of_platform_driver
 #define        to_of_platform_driver(drv) \
        container_of(drv,struct of_platform_driver, driver)
 
+extern const struct of_device_id of_default_bus_match_table[];
+
 /* Platform drivers register/unregister */
 extern struct platform_device *of_device_alloc(struct device_node *np,
                                         const char *bus_id,