Messages in this thread | | | Date | Wed, 12 Jan 2011 19:29:29 +0100 | From | Sebastian Andrzej Siewior <> | Subject | Re: [PATCH v2 13/15] x86/rtc: don't register rtc if we the DT blob |
| |
* Grant Likely | 2011-01-11 17:02:24 [-0700]:
>> +static __init int have_DTB(void) >> +{ >> + if (initial_boot_params) >> + return 1; >> + return 0; >> +}
>Not quite the right test. For instance, OLPC has real openfirmware so >initial_boot_params will be zero even though there is a fully >populated device tree. Should test the allnodes value instead. Oh really? They do have a device tree and their initial_boot_params is NULL? I assumed they boot via OF but I saw no evidence of the device tree as it. In fact I noticed that they have a static PCI bus living in arch/x86 and I assumed that is the place where their devices are comming from. However, this _could_ change the behavior of OLPC and they could lack an RTC now if it is not comming via isa_pnp thing or via the device tree (which had no bindings until recently).
>Also, this test is useful to more than just rtc I'm sure. It could >easily live in linux/of.h. Okay.
>Finally one minor nit. This is more verbose than it needs to be. It >could instead be: "return allnodes != NULL;", and the __init is >unnecessary on a static inline.
Okay. The static line has no __init just the non inline has __init :)
>g.
Sebastian
| |