From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Subject: Re: [PATCH 2/4] spi: split up spi_new_device() to allow two stage registration. Date: Wed, 21 May 2008 17:17:13 -0700 Message-ID: <200805211717.13206.david-b@pacbell.net> References: <20080516193054.28030.35126.stgit@trillian.secretlab.ca> <20080516193608.28030.34968.stgit@trillian.secretlab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, fabrizio.garetto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Grant Likely Return-path: In-Reply-To: <20080516193608.28030.34968.stgit-8FIgwK2HfyId2tlXD8uQ6/kpB+XfMlBf@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Friday 16 May 2008, Grant Likely wrote: > > This patch splits the allocation and registration portions of code out > of spi_new_device() and creates three new functions; spi_alloc_device(), > spi_register_device(), and spi_device_release(). I have no problem with the first two, but why the last? If the devices are always allocated by spi_alloc_device() as they should be -- probably through an intermediary -- the only public function necessary for that cleanup should be the existing spi_dev_put(). - Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp105.sbc.mail.mud.yahoo.com (smtp105.sbc.mail.mud.yahoo.com [68.142.198.204]) by ozlabs.org (Postfix) with SMTP id 44C51DDFA5 for ; Thu, 22 May 2008 13:45:08 +1000 (EST) From: David Brownell To: Grant Likely Subject: Re: [PATCH 2/4] spi: split up spi_new_device() to allow two stage registration. Date: Wed, 21 May 2008 17:17:13 -0700 References: <20080516193054.28030.35126.stgit@trillian.secretlab.ca> <20080516193608.28030.34968.stgit@trillian.secretlab.ca> In-Reply-To: <20080516193608.28030.34968.stgit@trillian.secretlab.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <200805211717.13206.david-b@pacbell.net> Cc: linuxppc-dev@ozlabs.org, fabrizio.garetto@gmail.com, linux-kernel@vger.kernel.org, spi-devel-general@lists.sourceforge.net List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 16 May 2008, Grant Likely wrote: > > This patch splits the allocation and registration portions of code out > of spi_new_device() and creates three new functions; spi_alloc_device(), > spi_register_device(), and spi_device_release(). I have no problem with the first two, but why the last? If the devices are always allocated by spi_alloc_device() as they should be -- probably through an intermediary -- the only public function necessary for that cleanup should be the existing spi_dev_put(). - Dave From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764069AbYEVDix (ORCPT ); Wed, 21 May 2008 23:38:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757398AbYEVDi1 (ORCPT ); Wed, 21 May 2008 23:38:27 -0400 Received: from smtp105.sbc.mail.mud.yahoo.com ([68.142.198.204]:36087 "HELO smtp105.sbc.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756991AbYEVDi0 (ORCPT ); Wed, 21 May 2008 23:38:26 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pacbell.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=6No9QQC+V2kdfSEkdeN8A6MmD4FhddbRQyq8q3fBLS79Q43eeTt6Yr7xFJ4vMtYpsHsUb0Bpuicb8d8bFg6V668crR90gbzODGuI8IbwOHHGvVoCQaPAvclCfVQi1K3NqzKBzwvGizt1dUDxNOdBxkiZkHfA1GmP2/XpW33N1c0= ; X-YMail-OSG: T_ir7VQVM1nCtGCxF8X9cXIpyG56Gj2pnzcxqZ1QBOGqzcQATbd.J4sSD5hI1ObjAJ3K_H8zthkDmGvpABq_HQa4EGdiZCQdEKuMn1JYxM50Q7joh.5b3e56Rbbo7SJ9yrU- X-Yahoo-Newman-Property: ymail-3 From: David Brownell To: Grant Likely Subject: Re: [PATCH 2/4] spi: split up spi_new_device() to allow two stage registration. Date: Wed, 21 May 2008 17:17:13 -0700 User-Agent: KMail/1.9.9 Cc: linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net, linux-kernel@vger.kernel.org, fabrizio.garetto@gmail.com, jonsmirl@gmail.com References: <20080516193054.28030.35126.stgit@trillian.secretlab.ca> <20080516193608.28030.34968.stgit@trillian.secretlab.ca> In-Reply-To: <20080516193608.28030.34968.stgit@trillian.secretlab.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805211717.13206.david-b@pacbell.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 16 May 2008, Grant Likely wrote: > > This patch splits the allocation and registration portions of code out > of spi_new_device() and creates three new functions; spi_alloc_device(), > spi_register_device(), and spi_device_release(). I have no problem with the first two, but why the last? If the devices are always allocated by spi_alloc_device() as they should be -- probably through an intermediary -- the only public function necessary for that cleanup should be the existing spi_dev_put(). - Dave