Skip to content

Commit 063029a

Browse files
khilmangregkh
authored andcommitted
Revert "drivers: bus: simple-pm-bus: Add support for probing simple bus only devices"
This reverts commit d5f13bb which is commit 98e96cf upstream. This change related to fw_devlink was backported to v5.10 but has severaly other dependencies that were not backported. As discussed with the original author, the best approach for v5.10 is to revert. Link: https://lore.kernel.org/linux-omap/7hk0efmfzo.fsf@baylibre.com Acked-by: Saravana Kannan <saravanak@google.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 42fdbf8 commit 063029a

1 file changed

Lines changed: 1 addition & 38 deletions

File tree

‎drivers/bus/simple-pm-bus.c‎

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,7 @@
1616

1717
static int simple_pm_bus_probe(struct platform_device *pdev)
1818
{
19-
const struct device *dev = &pdev->dev;
20-
struct device_node *np = dev->of_node;
21-
const struct of_device_id *match;
22-
23-
/*
24-
* Allow user to use driver_override to bind this driver to a
25-
* transparent bus device which has a different compatible string
26-
* that's not listed in simple_pm_bus_of_match. We don't want to do any
27-
* of the simple-pm-bus tasks for these devices, so return early.
28-
*/
29-
if (pdev->driver_override)
30-
return 0;
31-
32-
match = of_match_device(dev->driver->of_match_table, dev);
33-
/*
34-
* These are transparent bus devices (not simple-pm-bus matches) that
35-
* have their child nodes populated automatically. So, don't need to
36-
* do anything more. We only match with the device if this driver is
37-
* the most specific match because we don't want to incorrectly bind to
38-
* a device that has a more specific driver.
39-
*/
40-
if (match && match->data) {
41-
if (of_property_match_string(np, "compatible", match->compatible) == 0)
42-
return 0;
43-
else
44-
return -ENODEV;
45-
}
19+
struct device_node *np = pdev->dev.of_node;
4620

4721
dev_dbg(&pdev->dev, "%s\n", __func__);
4822

@@ -56,25 +30,14 @@ static int simple_pm_bus_probe(struct platform_device *pdev)
5630

5731
static int simple_pm_bus_remove(struct platform_device *pdev)
5832
{
59-
const void *data = of_device_get_match_data(&pdev->dev);
60-
61-
if (pdev->driver_override || data)
62-
return 0;
63-
6433
dev_dbg(&pdev->dev, "%s\n", __func__);
6534

6635
pm_runtime_disable(&pdev->dev);
6736
return 0;
6837
}
6938

70-
#define ONLY_BUS ((void *) 1) /* Match if the device is only a bus. */
71-
7239
static const struct of_device_id simple_pm_bus_of_match[] = {
7340
{ .compatible = "simple-pm-bus", },
74-
{ .compatible = "simple-bus", .data = ONLY_BUS },
75-
{ .compatible = "simple-mfd", .data = ONLY_BUS },
76-
{ .compatible = "isa", .data = ONLY_BUS },
77-
{ .compatible = "arm,amba-bus", .data = ONLY_BUS },
7841
{ /* sentinel */ }
7942
};
8043
MODULE_DEVICE_TABLE(of, simple_pm_bus_of_match);

0 commit comments

Comments
 (0)