diff --git a/[refs] b/[refs] index bd68bcd410b1..924ca0fd1802 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4e4f62bf7396fca48efe61513640ee399a6046e3 +refs/heads/master: 05212157e94ccf4cf458413bbba509cfa95ff92b diff --git a/trunk/drivers/base/platform.c b/trunk/drivers/base/platform.c index 4d99c8bdfedc..fac3633c7223 100644 --- a/trunk/drivers/base/platform.c +++ b/trunk/drivers/base/platform.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -673,7 +674,11 @@ static int platform_match(struct device *dev, struct device_driver *drv) struct platform_device *pdev = to_platform_device(dev); struct platform_driver *pdrv = to_platform_driver(drv); - /* match against the id table first */ + /* Attempt an OF style match first */ + if (of_driver_match_device(dev, drv)) + return 1; + + /* Then try to match against the id table */ if (pdrv->id_table) return platform_match_id(pdrv->id_table, pdev) != NULL;