22 Apr
2020
22 Apr
'20
11:51 a.m.
proclk->sclk_lookup = clkdev_hw_create(&proclk->hw, "sclk", NULL);
if (!proclk->sclk_lookup) {
+#ifndef CONFIG_ACPI
Is it to save code space? Otherwise the ifdefs are pretty ugly and I'd prefer we just call of_clk APIs and rely on the inline stubs when CONFIG_OF isn't enabled to be optimized out.
CONFIG_OF was added as a dependency (see patch 10/16) so that we can use the 'compatible' string to probe w/ the PRP0001 device.
I must admit I don't know what these functions do so I just filtered them out in the ACPI case.
of_clk_del_provider(dev->of_node);
+#endif
return -ENOMEM;
}