From: Christoph Hellwig Subject: Re: [RFC] SQUASHME: pmem: Split up pmem_probe from pmem_alloc Date: Tue, 31 Mar 2015 18:10:21 +0200 Message-ID: <20150331161021.GB1152@lst.de> References: <1427358764-6126-1-git-send-email-hch@lst.de> <55143A8B.2060304@plexistor.com> <20150331092526.GA25958@lst.de> <551A762A.7090307@plexistor.com> <551AAD5B.4020104@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Boaz Harrosh , Christoph Hellwig , linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, ross.zwisler@linux.intel.com, axboe@kernel.dk To: Boaz Harrosh Return-path: Content-Disposition: inline In-Reply-To: <551AAD5B.4020104@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Mar 31, 2015 at 05:21:15PM +0300, Boaz Harrosh wrote: > -static int pmem_probe(struct platform_device *pdev) > +static int pmem_alloc(struct resource *res, struct device *dev, > + struct pmem_device **o_pmem) > { please return the pmem device or an ERR_PTR() here. Except for that it looks fine for me, and it's exactly what we'd export for your PCIe device which would get an almost trivial pci_driver wrapper around it.