]> www.infradead.org Git - linux.git/commitdiff
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
authorAndreas Schwab <schwab@linux-m68k.org>
Mon, 13 Jan 2025 17:19:09 +0000 (18:19 +0100)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Fri, 7 Mar 2025 13:38:38 +0000 (19:08 +0530)
Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells
property on the i2s node.

Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling")
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
[maddy: added "commit" work in depends-on to avoid checkpatch error]
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/875xmizl6a.fsf@igel.home
arch/powerpc/kernel/prom_init.c

index fce32b162ef3a34645b86cd44c6d5f7cecb768d0..827c958677f8cb2e048bfbbb454250620e3d12e4 100644 (file)
@@ -2889,11 +2889,11 @@ static void __init fixup_device_tree_pmac(void)
        char type[8];
        phandle node;
 
-       // Some pmacs are missing #size-cells on escc nodes
+       // Some pmacs are missing #size-cells on escc or i2s nodes
        for (node = 0; prom_next_node(&node); ) {
                type[0] = '\0';
                prom_getprop(node, "device_type", type, sizeof(type));
-               if (prom_strcmp(type, "escc"))
+               if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
                        continue;
 
                if (prom_getproplen(node, "#size-cells") != PROM_ERROR)