summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt/fdt_common.c
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2012-08-25 20:18:12 +0000
committergonzo <gonzo@FreeBSD.org>2012-08-25 20:18:12 +0000
commit3fb8d316816c6d0d53d795c57baf89b4153ee596 (patch)
treec6fe1b1a5cc525920b62e02d1732f490959358dc /sys/dev/fdt/fdt_common.c
parent37c67518991a85791aaa17a88fcdc4e92df23b5b (diff)
downloadFreeBSD-src-3fb8d316816c6d0d53d795c57baf89b4153ee596.zip
FreeBSD-src-3fb8d316816c6d0d53d795c57baf89b4153ee596.tar.gz
Do not swap byte order if we assign default value for intr_cells
Diffstat (limited to 'sys/dev/fdt/fdt_common.c')
-rw-r--r--sys/dev/fdt/fdt_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c
index 5619045..e257851 100644
--- a/sys/dev/fdt/fdt_common.c
+++ b/sys/dev/fdt/fdt_common.c
@@ -524,7 +524,8 @@ fdt_intr_to_rl(phandle_t node, struct resource_list *rl,
debugf("no intr-cells defined, defaulting to 1\n");
intr_cells = 1;
}
- intr_cells = fdt32_to_cpu(intr_cells);
+ else
+ intr_cells = fdt32_to_cpu(intr_cells);
intr_num = OF_getprop_alloc(node, "interrupts",
intr_cells * sizeof(pcell_t), (void **)&intr);
OpenPOWER on IntegriCloud