Skip to content

Commit 4550fe6

Browse files
vireshkrobherring
authored andcommitted
of: Don't create device for OPP tables
The OPP tables are present as separate nodes, whose phandle is used in the "operating-points-v2" property of devices. Currently the OF core creates a device for the OPP table unconditionally, which is not used by any kernel code. This patch creates another OF device_id table for the nodes which must be skipped while creating devices and OPP is the only user of it for now. Reported-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 304a39b commit 4550fe6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎drivers/of/platform.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ const struct of_device_id of_default_bus_match_table[] = {
3232
{} /* Empty terminated list */
3333
};
3434

35+
static const struct of_device_id of_skipped_node_table[] = {
36+
{ .compatible = "operating-points-v2", },
37+
{} /* Empty terminated list */
38+
};
39+
3540
static int of_dev_node_match(struct device *dev, void *data)
3641
{
3742
return dev->of_node == data;
@@ -356,6 +361,12 @@ static int of_platform_bus_create(struct device_node *bus,
356361
return 0;
357362
}
358363

364+
/* Skip nodes for which we don't want to create devices */
365+
if (unlikely(of_match_node(of_skipped_node_table, bus))) {
366+
pr_debug("%s() - skipping %pOF node\n", __func__, bus);
367+
return 0;
368+
}
369+
359370
if (of_node_check_flag(bus, OF_POPULATED_BUS)) {
360371
pr_debug("%s() - skipping %pOF, already populated\n",
361372
__func__, bus);

0 commit comments

Comments
 (0)