Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/selinux into for...
[linux-2.6-block.git] / drivers / of / device.c
index 20c1332a00182cb43bb707e2a7468dce73cdf991..8b91ea241b10f553f058885b5cc083a35e2a81fe 100644 (file)
@@ -163,6 +163,18 @@ void of_device_unregister(struct platform_device *ofdev)
 }
 EXPORT_SYMBOL(of_device_unregister);
 
+const void *of_device_get_match_data(const struct device *dev)
+{
+       const struct of_device_id *match;
+
+       match = of_match_device(dev->driver->of_match_table, dev);
+       if (!match)
+               return NULL;
+
+       return match->data;
+}
+EXPORT_SYMBOL(of_device_get_match_data);
+
 ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len)
 {
        const char *compat;