aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-16 15:18:20 -0500
committerBorislav Petkov <bp@suse.de>2018-11-17 13:29:55 -0500
commitc04e55388a4f2184e37827a1d2e733cded52d653 (patch)
tree239c451488fc989f5b425978a11881863ca4025b
parentccda4af0f4b92f7b4c308d3acc262f4a7e3affad (diff)
x86/platform/olpc: Do not call of_platform_bus_probe()
The DT core will probe the DT by default now, so the OLPC platform code calling of_platform_bus_probe() is not necessary. The algorithm for what nodes are probed is a little different in how compatible is handled, but since OLPC uses compatible strings for matching it is not affected by this difference. Also, only the battery node located at the root level gets a device created as the dcon is a PCI device and the RTC device is created in olpc-xo1-rtc.c. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> CC: "H. Peter Anvin" <hpa@zytor.com> CC: Ingo Molnar <mingo@redhat.com> CC: Lubomir Rintel <lkundrak@v3.sk> Cc: Thomas Gleixner <tglx@linutronix.de> CC: devicetree@vger.kernel.org CC: x86-ml <x86@kernel.org> Link: http://lkml.kernel.org/r/20181116201820.10065-1-robh@kernel.org
-rw-r--r--arch/x86/platform/olpc/olpc_dt.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/x86/platform/olpc/olpc_dt.c b/arch/x86/platform/olpc/olpc_dt.c
index 24d2175a9480..b4ab779f1d47 100644
--- a/arch/x86/platform/olpc/olpc_dt.c
+++ b/arch/x86/platform/olpc/olpc_dt.c
@@ -19,7 +19,6 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/memblock.h> 20#include <linux/memblock.h>
21#include <linux/of.h> 21#include <linux/of.h>
22#include <linux/of_platform.h>
23#include <linux/of_pdt.h> 22#include <linux/of_pdt.h>
24#include <asm/olpc.h> 23#include <asm/olpc.h>
25#include <asm/olpc_ofw.h> 24#include <asm/olpc_ofw.h>
@@ -285,20 +284,3 @@ void __init olpc_dt_build_devicetree(void)
285 pr_info("PROM DT: Built device tree with %u bytes of memory.\n", 284 pr_info("PROM DT: Built device tree with %u bytes of memory.\n",
286 prom_early_allocated); 285 prom_early_allocated);
287} 286}
288
289/* A list of DT node/bus matches that we want to expose as platform devices */
290static struct of_device_id __initdata of_ids[] = {
291 { .compatible = "olpc,xo1-battery" },
292 { .compatible = "olpc,xo1-dcon" },
293 { .compatible = "olpc,xo1-rtc" },
294 {},
295};
296
297static int __init olpc_create_platform_devices(void)
298{
299 if (machine_is_olpc())
300 return of_platform_bus_probe(NULL, of_ids, NULL);
301 else
302 return 0;
303}
304device_initcall(olpc_create_platform_devices);