From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [06/10,V2] spi: Add SPI driver for mx233/mx28 Date: Wed, 1 Aug 2012 07:58:37 -0700 Message-ID: <20120801145837.GA15630@roeck-us.net> References: <1341555449-17507-6-git-send-email-marex@denx.de> <201208010810.37652.marex@denx.de> <20120801063936.GC2764@roeck-us.net> <201208010845.19361.marex@denx.de> <20120801065650.GA2928@roeck-us.net> <20120801075010.GI1672@S2100-06.ap.freescale.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Fabio Estevam , Rob Herring , Marek Vasut , Stefano Babic , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Chris Ball , Dong Aisheng , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Shawn Guo Return-path: Content-Disposition: inline In-Reply-To: <20120801075010.GI1672-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Wed, Aug 01, 2012 at 03:50:12PM +0800, Shawn Guo wrote: > On Tue, Jul 31, 2012 at 11:56:50PM -0700, Guenter Roeck wrote: > > Guess we are in violent agreement. The sequence would then either be > > master = spi_alloc_device(); > > The discussion is around spi_alloc_master rather than spi_alloc_device, > isn't it? > Yes, sorry. Too late at night, too tired :(. Guenter > Regards, > Shawn > > > ... > > spi_master_put(master); > > or > > master = spi_alloc_device(); > > ... > > kfree(master); > > > > which makes sense to me. Question still is why most drivers neither call kfree() > > nor spi_master_put() in the remove function. > > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/