]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
of/platform: Disable generic device linking code for PowerPC
authorSaravana Kannan <saravanak@google.com>
Tue, 6 Aug 2019 19:26:54 +0000 (12:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Aug 2019 15:36:54 +0000 (17:36 +0200)
PowerPC platforms don't use the generic of/platform code to populate the
devices from DT.  Therefore the generic device linking code is never used
in PowerPC.  Compile it out to avoid warning about unused functions.

If a specific PowerPC platform wants to use this code in the future,
bringing this back for PowerPC would be trivial. We'll just need to export
of_link_to_suppliers() and then let the machine specific files do the
linking as they populate the devices from DT.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20190806192654.138605-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/platform.c

index a3cd69772264b89911c5f341636ecb9fa7789564..e5f7e40df439b578e70a46450c5182a36f9c7f2e 100644 (file)
@@ -506,6 +506,7 @@ int of_platform_default_populate(struct device_node *root,
 }
 EXPORT_SYMBOL_GPL(of_platform_default_populate);
 
+#ifndef CONFIG_PPC
 static bool of_link_is_valid(struct device_node *con, struct device_node *sup)
 {
        of_node_get(sup);
@@ -683,7 +684,6 @@ static int of_link_to_suppliers(struct device *dev)
        return __of_link_to_suppliers(dev, dev->of_node);
 }
 
-#ifndef CONFIG_PPC
 static const struct of_device_id reserved_mem_matches[] = {
        { .compatible = "qcom,rmtfs-mem" },
        { .compatible = "qcom,cmd-db" },