Re: [PATCH] OF: kobj node lifecycle fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Grant,

On Mar 13, 2014, at 12:49 AM, Grant Likely wrote:

> From: Pantelis Antoniou <panto@xxxxxxxxxxxxxxxxxxxxxxx>
> 
> After the move to having device nodes be proper kobjects the lifecycle
> of the node needs to be controlled better.
> 
> At first convert of_add_node() in the unflattened functions to
> of_init_node() which initializes the kobject so that of_node_get/put
> work correctly even before of_init is called.
> 
> Afterwards introduce of_node_is_initialized & of_node_is_attached that
> query the underlying kobject about the state (attached means kobj
> is visible in sysfs)
> 
> Using that make sure the lifecycle of the tree is correct at all
> times.
> 
> Signed-off-by: Pantelis Antoniou <panto@xxxxxxxxxxxxxxxxxxxxxxx>
> [grant.likely: moved of_node_init() calls, fixed up locking, and
>               dropped __of_populate() hunks]
> Signed-off-by: Grant Likely <grant.likely@xxxxxxxxxx>
> ---
> 
> I've reworked Pantelis' patch to work on my tree. Here's the result.
> I've already got this in my tree and will be pushing it out shortly.
> 
> g.
> 
> drivers/of/base.c  | 35 ++++++++++++++++++++++++++---------
> drivers/of/fdt.c   |  3 +--
> drivers/of/pdt.c   |  3 +--
> include/linux/of.h | 19 +++++++++++++++++++
> 4 files changed, 47 insertions(+), 13 deletions(-)
> 

Looks good; booted and tested overlays with no issues.

Regards

-- Pantelis

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux