>> -avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len);
>> -phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0];
>> +phys_addr = of_get_property(avr, "reg", &len);
>> +avr_clock_prop = of_get_property(avr, "clock-frequency", &len);
>
> If you don't use the value o
On Wed, 26 Sep 2007 10:52:23 +1000 Jeremy Kerr <[EMAIL PROTECTED]> wrote:
>
> Stephen,
>
> > If you don't use the value of the len variable, then you can pass
> > NULL to of_get_property.
>
> Sure, but that's probably a separate patch, no ?
OK.
> > Not *phys_addr?
>
> That's what the existing
Stephen,
> If you don't use the value of the len variable, then you can pass
> NULL to of_get_property.
Sure, but that's probably a separate patch, no ?
> Not *phys_addr?
That's what the existing code does. I'm guessing that it treats
phys_addr as an array with one entry, not a single u32.
Ch
On Fri, 14 Sep 2007 15:46:40 +1000 Jeremy Kerr <[EMAIL PROTECTED]> wrote:
>
> - avr_clock = *(u32*)of_get_property(avr, "clock-frequency", &len);
> - phys_addr = ((u32*)of_get_property(avr, "reg", &len))[0];
> + phys_addr = of_get_property(avr, "reg", &len);
> + avr_clock_prop = of_
On Sep 14, 2007, at 12:46 AM, Jeremy Kerr wrote:
> Use a temporary variable of the correct type instead.
>
> Also, this allows us to check the return value in ls_uarts_init, to
> avoid dereferencing a null pointer if required properties aren't
> present.
>
> Signed-off-by: Jeremy Kerr <[EMAIL PRO
Use a temporary variable of the correct type instead.
Also, this allows us to check the return value in ls_uarts_init, to
avoid dereferencing a null pointer if required properties aren't
present.
Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
---
arch/powerpc/platforms/embedded6xx/ls_uart.c |