From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EE63721303087 for ; Tue, 6 Aug 2019 22:45:36 -0700 (PDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x775gHOT020090 for ; Wed, 7 Aug 2019 01:43:05 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2u7phc42af-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 07 Aug 2019 01:43:05 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Aug 2019 06:43:03 +0100 From: Vaibhav Jain Subject: Re: [PATCH] nvdimm/of_pmem: Provide a unique name for bus provider In-Reply-To: <20190807040029.11344-1-aneesh.kumar@linux.ibm.com> References: <20190807040029.11344-1-aneesh.kumar@linux.ibm.com> Date: Wed, 07 Aug 2019 11:12:58 +0530 MIME-Version: 1.0 Message-Id: <8736id1qfx.fsf@vajain21.in.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: "Aneesh Kumar K.V" , dan.j.williams@intel.com Cc: linuxppc-dev@lists.ozlabs.org, linux-nvdimm@lists.01.org List-ID: "Aneesh Kumar K.V" writes: > ndctl utility requires the ndbus to have unique names. If not while > enumerating the bus in userspace it drops bus with similar names. > This results in us not listing devices beneath the bus. > > Signed-off-by: Aneesh Kumar K.V > --- > drivers/nvdimm/of_pmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvdimm/of_pmem.c b/drivers/nvdimm/of_pmem.c > index a0c8dcfa0bf9..97187d6c0bdb 100644 > --- a/drivers/nvdimm/of_pmem.c > +++ b/drivers/nvdimm/of_pmem.c > @@ -42,7 +42,7 @@ static int of_pmem_region_probe(struct platform_device *pdev) > return -ENOMEM; > > priv->bus_desc.attr_groups = bus_attr_groups; > - priv->bus_desc.provider_name = "of_pmem"; > + priv->bus_desc.provider_name = kstrdup(pdev->name, GFP_KERNEL); > priv->bus_desc.module = THIS_MODULE; > priv->bus_desc.of_node = np; > > -- > 2.21.0 > Tested-by: Vaibhav Jain -- Vaibhav Jain Linux Technology Center, IBM India Pvt. Ltd. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm