mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
driver-core: platform: probe of-devices only using list of compatibles
There are several indications that make a platform device match a platform driver. For devices that are instantiated by a device tree matching by name, id table or acpi mechanisms doesn't make sense and might result in surprising effects. So limit matching to use the driver's of_match_table for these. Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cf68d85529
commit
67d02a1bbb
1 changed files with 2 additions and 2 deletions
|
@ -949,8 +949,8 @@ static int platform_match(struct device *dev, struct device_driver *drv)
|
|||
return !strcmp(pdev->driver_override, drv->name);
|
||||
|
||||
/* Attempt an OF style match first */
|
||||
if (of_driver_match_device(dev, drv))
|
||||
return 1;
|
||||
if (pdev->dev.of_node)
|
||||
return of_driver_match_device(dev, drv);
|
||||
|
||||
/* Then try ACPI style match */
|
||||
if (acpi_driver_match_device(dev, drv))
|
||||
|
|
Loading…
Reference in a new issue