nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <bsingharora@gmail.com>
To: Oliver O'Halloran <oohall@gmail.com>
Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-nvdimm@lists.01.org
Subject: Re: [PATCH 2/6] libnvdimm: Add nd_region_destroy()
Date: Mon, 26 Mar 2018 10:24:46 +1100	[thread overview]
Message-ID: <20180326102446.60358bf6@gmail.com> (raw)
In-Reply-To: <20180323081209.31387-2-oohall@gmail.com>

On Fri, 23 Mar 2018 19:12:05 +1100
Oliver O'Halloran <oohall@gmail.com> wrote:

> Currently there's no way to remove a region from and nvdimm_bus without
> tearing down the whole bus. This patch adds an API for removing a single
> region from the bus so that we can implement a sensible unbind operation
> for the of_nd_region platform driver.
> 
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> ---
>  drivers/nvdimm/region_devs.c | 6 ++++++
>  include/linux/libnvdimm.h    | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
> index 2f1d5771100e..76f46fd1fae0 100644
> --- a/drivers/nvdimm/region_devs.c
> +++ b/drivers/nvdimm/region_devs.c
> @@ -1039,6 +1039,12 @@ struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus *nvdimm_bus,
>  }
>  EXPORT_SYMBOL_GPL(nvdimm_blk_region_create);
>  
> +void nd_region_destroy(struct nd_region *region)
> +{
> +	nd_device_unregister(&region->dev, ND_SYNC);

child_unregister seems to do the same thing, but is expected to be used
as a callback from device_for_each_child()

I'd suggest we merge the two and rename child_unregister and nd_region_unregister

Balbir Singh.

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  parent reply	other threads:[~2018-03-25 23:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  8:12 [PATCH 1/6] libnvdimm: Add of_node to region and bus descriptors Oliver O'Halloran
2018-03-23  8:12 ` [PATCH 2/6] libnvdimm: Add nd_region_destroy() Oliver O'Halloran
2018-03-23 16:59   ` Dan Williams
2018-03-25 23:24   ` Balbir Singh [this message]
2018-03-23  8:12 ` [PATCH 3/6] libnvdimm: Add device-tree based driver Oliver O'Halloran
2018-03-23 17:07   ` Dan Williams
2018-03-26  1:07     ` Oliver
2018-03-25  2:51   ` kbuild test robot
2018-03-25  4:27   ` kbuild test robot
2018-03-25  4:28   ` [RFC PATCH] libnvdimm: bus_desc can be static kbuild test robot
2018-03-26  4:05   ` [PATCH 3/6] libnvdimm: Add device-tree based driver Balbir Singh
2018-03-23  8:12 ` [PATCH 4/6] libnvdimm/of: Symlink platform and region devices Oliver O'Halloran
2018-03-23 17:08   ` Dan Williams
2018-03-23  8:12 ` [PATCH 5/6] powerpc/powernv: Create platform devs for nvdimm buses Oliver O'Halloran
2018-03-23  8:12 ` [PATCH 6/6] doc/devicetree: NVDIMM region documentation Oliver O'Halloran
2018-03-26 22:24   ` Rob Herring
2018-03-27 14:53     ` Oliver
2018-03-28 17:06       ` Rob Herring
2018-03-28 17:25         ` Dan Williams
2018-03-29  3:10         ` Oliver
2018-03-25 23:16 ` [PATCH 1/6] libnvdimm: Add of_node to region and bus descriptors Balbir Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180326102446.60358bf6@gmail.com \
    --to=bsingharora@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oohall@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).