From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751592AbZJWHvX (ORCPT ); Fri, 23 Oct 2009 03:51:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751395AbZJWHvW (ORCPT ); Fri, 23 Oct 2009 03:51:22 -0400 Received: from zmc.proxad.net ([212.27.53.206]:45351 "EHLO zmc.proxad.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbZJWHvV (ORCPT ); Fri, 23 Oct 2009 03:51:21 -0400 X-Spam-Flag: NO X-Spam-Score: -4.249 From: Florian Fainelli To: spi-devel-general@lists.sourceforge.net Subject: Re: [PATCH] fix spidev compilation when VERBOSE is defined Date: Fri, 23 Oct 2009 09:51:22 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.28-16-server; KDE/4.2.2; x86_64; ; ) Cc: dbrownell@users.sourceforge.net, Maxime Bizon , linux-kernel@vger.kernel.org References: <200910061759.17327.ffainelli@freebox.fr> In-Reply-To: <200910061759.17327.ffainelli@freebox.fr> Organization: Freebox MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910230951.22725.ffainelli@freebox.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David, Ping ? On Tuesday 06 October 2009 17:59:16 Florian Fainelli wrote: > (please CC me as I am not subscribed to spi-devel-general). > > When VERBOSE is defined in the spidev module, the compilation > will throw an error on 'spi' not being defined: > > CC [M] drivers/spi/spidev.o > drivers/spi/spidev.c: In function 'spidev_message': > drivers/spi/spidev.c:266: error: 'spi' undeclared (first use in this > function) drivers/spi/spidev.c:266: error: (Each undeclared identifier is > reported only once drivers/spi/spidev.c:266: error: for each function it > appears in.) > > instead of using spi-> we should actually use spidev->spi. > This patch fixes the build failure. > > CC: David Brownell > CC: Maxime Bizon > Signed-off-by: Florian Fainelli > -- > diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c > index 5d869c4..c80c31b 100644 > --- a/drivers/spi/spidev.c > +++ b/drivers/spi/spidev.c > @@ -262,15 +262,15 @@ static int spidev_message(struct spidev_data *spidev, > k_tmp->delay_usecs = u_tmp->delay_usecs; > k_tmp->speed_hz = u_tmp->speed_hz; > #ifdef VERBOSE > - dev_dbg(&spi->dev, > + dev_dbg(&spidev->spi->dev, > " xfer len %zd %s%s%s%dbits %u usec %uHz\n", > u_tmp->len, > u_tmp->rx_buf ? "rx " : "", > u_tmp->tx_buf ? "tx " : "", > u_tmp->cs_change ? "cs " : "", > - u_tmp->bits_per_word ? : spi->bits_per_word, > + u_tmp->bits_per_word ? : spidev->spi->bits_per_word, > u_tmp->delay_usecs, > - u_tmp->speed_hz ? : spi->max_speed_hz); > + u_tmp->speed_hz ? : spidev->spi->max_speed_hz); > #endif > spi_message_add_tail(k_tmp, &msg); > } > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Florian