> +             cur->bsr_addr   = reg[i * 2];
> +             cur->bsr_len    = reg[i * 2 + 1];

That's fishy... hand-reading of "reg" property without taking
into account the parent's #size-cells/#address-cells... can't you
use of_address_to_resource or something similar and carry a struct
resource around instead ?

In fact, same goes with the way you do num_bsr_devs = reg_len / 16.

You should rather use -another- property of well known lenght, or
get the #address/#size-cells of the parent and use those appropriately.

Cheers,
Ben.



_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to