X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fof%2Fdevice.c;h=8b91ea241b10f553f058885b5cc083a35e2a81fe;hb=d8132e08d25a47e2d5156aa2268cd1cd9b0d6c0d;hp=20c1332a00182cb43bb707e2a7468dce73cdf991;hpb=b9e2c097efe19c3c04ea3d84b295748e39e96c2b;p=karo-tx-linux.git diff --git a/drivers/of/device.c b/drivers/of/device.c index 20c1332a0018..8b91ea241b10 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -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;