From: Benjamin Herrenschmidt Date: Thu, 29 Aug 2013 06:56:59 +0000 (+1000) Subject: powerpc/scom: Create debugfs files using ibm,chip-id if available X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=762fd3ab6d2c4b438ce49f54860dc509e591209c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git powerpc/scom: Create debugfs files using ibm,chip-id if available When creating the debugfs scom files, use "ibm,chip-id" as the scom%d index rather than a simple made up number when possible. Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/sysdev/scom.c b/arch/powerpc/sysdev/scom.c index 413622d54395..cb20d542a5aa 100644 --- a/arch/powerpc/sysdev/scom.c +++ b/arch/powerpc/sysdev/scom.c @@ -196,8 +196,13 @@ static int scom_debug_init(void) return -1; i = rc = 0; - for_each_node_with_property(dn, "scom-controller") - rc |= scom_debug_init_one(root, dn, i++); + for_each_node_with_property(dn, "scom-controller") { + int id = of_get_ibm_chip_id(dn); + if (id == -1) + id = i; + rc |= scom_debug_init_one(root, dn, id); + i++; + } return rc; }