diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-15 21:52:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-15 21:52:59 +0100 |
commit | 112d125a89479519efc437b2961b8d4a98761c1b (patch) | |
tree | 41395065cff396a1e09fc9e5f656356419a48e31 /drivers/base | |
parent | Merge 4.5-rc4 into driver-core-next (diff) | |
download | linux-112d125a89479519efc437b2961b8d4a98761c1b.tar.xz linux-112d125a89479519efc437b2961b8d4a98761c1b.zip |
Revert "driver-core: platform: probe of-devices only using list of compatibles"
This reverts commit 67d02a1bbb334558e9380409a3cd426b36d4578b
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
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 1b5b7b5b50c0..f437afa17f2b 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -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)) |