From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Subject: Re: Segmentation fault when calling spi_sync function Date: Wed, 30 Jan 2008 10:45:29 -0800 Message-ID: <200801301045.29630.david-b@pacbell.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Nikesh Gawande To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: 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 Wednesday 30 January 2008, Nikesh Gawande wrote: > I am doing this in my > driver but at the point when spi_sync() is called I get the following > messages. which is something about segmentation fault. I am not > understanding the error. Presumably you didn't set up the spi_message correctly or spi_device correctly. Find what the code at that location was referencing, and then you'll know what initialization you forgot. > Is it compulsory to call spi_sync() or spi_async() functions for data > transfer. Is there any other way to do it? The spi_sync() call wraps spi_async(); there are a few other wrappers too. Fundamentally everything boils down to a spi_async() call; there is no other primitive at the controller level. - 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/