[RFC 1/4] libnvdimm: add to_{nvdimm,nd_region}_dev()

Dan Williams dan.j.williams at intel.com
Tue Jul 11 09:53:33 AEST 2017

On Tue, Jun 27, 2017 at 3:28 AM, Oliver O'Halloran <oohall at gmail.com> wrote:
> struct device contains the ->of_node pointer so that devices can be
> assoicated with the device-tree node that created them on DT platforms.
> libnvdimm hides the struct device for regions and nvdimm devices inside
> of an opaque structure so this patch adds accessors for each to allow
> the of_nvdimm driver to set the of_node pointer.

I'd rather go the other way and pass in the of_node to the bus and
dimm registration routines. It's a generic property of the device so
we should handle it like other generic device properties that get set
at initialization time like 'attr_groups' in nvdimm_bus_descriptor, or
a new parameter to nvdimm_create().

More information about the Linuxppc-dev mailing list