On Tue, Feb 22, 2011 at 1:07 PM, Sebastian Andrzej Siewior
<[email protected]> wrote:
> This allows to load the OF driver based informations from the device
> tree. Systems without BIOS may need to perform some initialization.
> PowerPC creates a PNP device from the OF information and performs this
> kind of initialization in their private PCI quirk. This looks more
> generic.
> This patch also avoids registering the platform RTC driver on X86 if we
> have a device tree blob. Without it we end up with of this devices. It
> is in this hunk in order to remain bisectable.
>
> Cc: [email protected]
> Cc: Alessandro Zummo <[email protected]>
> Cc: [email protected]
> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
> Signed-off-by: Dirk Brandewie <[email protected]>

Itty-bitty nit below, but otherwise:

Acked-by: Grant Likely <[email protected]>

[...]
> diff --git a/include/linux/of.h b/include/linux/of.h
> index d9dd664..8de7c29 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -70,6 +70,11 @@ extern struct device_node *allnodes;
>  extern struct device_node *of_chosen;
>  extern rwlock_t devtree_lock;
>
> +static inline int of_have_populated_dt(void)

Personally, I'd make this a 'bool' return value.

> +{
> +       return allnodes != NULL;
> +}
> +
>  static inline bool of_node_is_root(const struct device_node *node)
>  {
>        return node && (node->parent == NULL);
> @@ -222,5 +227,12 @@ extern void of_attach_node(struct device_node *);
>  extern void of_detach_node(struct device_node *);
>  #endif
>
> +#else
> +
> +static inline int of_have_populated_dt(void)
> +{
> +       return 0;

and then 'return false'; here.

But by *no means* should this patch be delayed by this comment.  :-)

g.
_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to