Skip to content

Commit

Permalink
Revert "driver-core: platform: probe of-devices only using list of co…
Browse files Browse the repository at this point in the history
…mpatibles"

This reverts commit 67d02a1

This should reallow binding of of-devices by name.

It turned out that there are valid reasons (e.g. step by step conversion
to device tree probing using auxdata) to bind of-instantiated devices to
drivers by name. So revert to the original logic.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
  • Loading branch information
gregkh committed Feb 15, 2016
1 parent c21b04f commit 112d125
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (pdev->dev.of_node)
return of_driver_match_device(dev, drv);
if (of_driver_match_device(dev, drv))
return 1;

/* Then try ACPI style match */
if (acpi_driver_match_device(dev, drv))
Expand Down

0 comments on commit 112d125

Please sign in to comment.